mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 08:18:49 -07:00
Fixed Math Blaster's mutt textures. (#6)
Will now set to appropriate mutt texture if pet is using a larva texture and is older than HATCHING. The pet data saving code will now set to appropriate mutt texture if pet is using a larva texture and is older than HATCHING. This fixes the issue that mutts were using their old larva's texture instead of the mutt's default texture. Any existing mutts using the wrong texture will have it changed when the pet is saved (not when loaded). For users to see the fixed texture they would need to restart the game after the affected mutt(s)' data changed in any way (or otherwise saved to the server).
This commit is contained in:
parent
9993198a9b
commit
2203bae81f
@ -622,7 +622,7 @@ public class ContentController : Controller {
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/xml")]
|
||||
[Route("ContentWebService.asmx/SetRaisedPet")] // used by World Of Jumpstart
|
||||
[Route("ContentWebService.asmx/SetRaisedPet")] // used by World Of Jumpstart and Math Blaster
|
||||
[VikingSession]
|
||||
public IActionResult SetRaisedPetv1(Viking viking, [FromForm] string raisedPetData) {
|
||||
RaisedPetData petData = XmlUtil.DeserializeXml<RaisedPetData>(raisedPetData);
|
||||
@ -633,6 +633,17 @@ public class ContentController : Controller {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
if (petData.Texture.StartsWith("RS_SHARED/Larva.unity3d/LarvaTex") && petData.GrowthState.GrowthStateID>4) {
|
||||
petData.Texture = "RS_SHARED/" + petData.PetTypeID switch {
|
||||
5 => "EyeClops.unity3d/EyeClopsBrainRedTex", // EyeClops
|
||||
6 => "RodeoLizard.unity3d/BlueLizardTex", // RodeoLizard
|
||||
7 => "MonsterAlien01.unity3d/BlasterMythieGreenTex", // MonsterAlien01
|
||||
11 => "SpaceGriffin.unity3d/SpaceGriffinNormalBlueTex", // SpaceGriffin
|
||||
10 => "Tweeter.unity3d/TweeterMuttNormalPurple", // Tweeter
|
||||
_ => "null" // Anything with any other ID shouldn't exist.
|
||||
};
|
||||
}
|
||||
|
||||
dragon.RaisedPetData = XmlUtil.SerializeXml(UpdateDragon(dragon, petData));
|
||||
ctx.Update(dragon);
|
||||
ctx.SaveChanges();
|
||||
|
Loading…
x
Reference in New Issue
Block a user