diff options
| author | Gildor <gildor55@gmail.com> | 2021-11-20 20:49:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-20 21:49:30 +0200 |
| commit | a5b8e167dda0697f88b16ce0892912afda4c3e4b (patch) | |
| tree | da8726ff84e0b42da157444d389edc8dfafafa83 | |
| parent | 04d54a000fd2629155dfb43db79e5e2023bc84ac (diff) | |
Core/Auras: Set proper displayId for mounts that changes depending on your Riding skill and location with more than one modelId (#27207)
Closes #27199
| -rw-r--r-- | sql/updates/world/3.3.5/2021_11_20_01_world.sql | 5 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sql/updates/world/3.3.5/2021_11_20_01_world.sql b/sql/updates/world/3.3.5/2021_11_20_01_world.sql new file mode 100644 index 00000000000..ffab25bb6c1 --- /dev/null +++ b/sql/updates/world/3.3.5/2021_11_20_01_world.sql @@ -0,0 +1,5 @@ +-- Set proper modelid +UPDATE `creature_template` SET `modelid1`=31248, `modelid2`=31007 WHERE `entry`=38545; -- Invincible +UPDATE `creature_template` SET `modelid1`=31957, `modelid2`=31958 WHERE `entry`=40625; -- Celestial Steed +-- Invincible wrong otherGender displayID +UPDATE `creature_model_info` SET `DisplayID_Other_Gender`=0 WHERE `DisplayID` IN (31007,31248); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 470964e0c35..3dbaf996478 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2610,7 +2610,10 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creatureEntry)) { - displayId = ObjectMgr::ChooseDisplayId(creatureInfo); + if (GetMiscValueB() > 0) // Choose proper modelid + displayId = GetMiscValueB() == 2 && creatureInfo->Modelid2 > 0 ? creatureInfo->Modelid2 : creatureInfo->Modelid1; + else // Should we choose random modelid in this case? + displayId = ObjectMgr::ChooseDisplayId(creatureInfo); sObjectMgr->GetCreatureModelRandomGender(&displayId); vehicleId = creatureInfo->VehicleId; |
