diff options
-rwxr-xr-x | src/server/game/DataStores/DBCStructure.h | 4 | ||||
-rwxr-xr-x | src/server/game/DataStores/DBCfmt.h | 2 | ||||
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 62 | ||||
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 1 |
4 files changed, 28 insertions, 41 deletions
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 2dfaaaaae5a..8083f1c6378 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1610,8 +1610,8 @@ struct SpellShapeshiftEntry int32 creatureType; // 20 <= 0 humanoid, other normal creature types //uint32 unk1; // 21 unused uint32 attackSpeed; // 22 - //uint32 modelID; // 23 unused, alliance modelid (where horde case?) - //uint32 unk2; // 24 unused + uint32 modelID_A; // 23 alliance modelid + uint32 modelID_H; // 24 horde modelid (only one form) //uint32 unk3; // 25 unused //uint32 unk4; // 26 unused uint32 stanceSpell[MAX_SHAPESHIFT_SPELLS]; // 27 - 34 unused diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index cea1c2d9a7a..a95ed4c4787 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -101,7 +101,7 @@ const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; const char SpellRadiusfmt[]="nfxf"; const char SpellRangefmt[]="nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char SpellRuneCostfmt[]="niiii"; -const char SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixixxxxiiiiiiii"; +const char SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii"; const char StableSlotPricesfmt[] = "ni"; const char SummonPropertiesfmt[] = "niiiii"; const char TalentEntryfmt[]="niiiiiiiixxxxixxixxxxxx"; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 043e6d179b1..0a89700c001 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16340,51 +16340,37 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form) return 2281; else return 2289; - case FORM_THARONJA_SKELETON: - return 1034; - case FORM_STEVES_GHOUL: - return 128; - case FORM_AMBIENT: - return 328; - case FORM_ZOMBIE: - return 26942; - case FORM_TRAVEL: - return 918; - case FORM_AQUA: - return 2428; - case FORM_GHOUL: - return 25527; - case FORM_CREATUREBEAR: - return 2281; - case FORM_CREATURECAT: - return 892; - case FORM_GHOSTWOLF: - return 4613; case FORM_FLIGHT: if (Player::TeamForRace(getRace()) == ALLIANCE) return 20857; - else - return 20872; - case FORM_MOONKIN: - if (Player::TeamForRace(getRace()) == ALLIANCE) - return 15374; - else - return 15375; + return 20872; case FORM_FLIGHT_EPIC: if (Player::TeamForRace(getRace()) == ALLIANCE) return 21243; - else - return 21244; - case FORM_METAMORPHOSIS: - return 25277; - case FORM_MASTER_ANGLER: - return 17170; - case FORM_TREE: - return 864; - case FORM_SPIRITOFREDEMPTION: - return 16031; + return 21244; default: - break; + { + uint32 modelid = 0; + SpellShapeshiftEntry const* formEntry = sSpellShapeshiftStore.LookupEntry(form); + if (formEntry && formEntry->modelID_A) + { + // Take the alliance modelid as default + if (GetTypeId() != TYPEID_PLAYER) + return formEntry->modelID_A; + else + { + if (Player::TeamForRace(getRace()) == ALLIANCE) + modelid = formEntry->modelID_A; + else + modelid = formEntry->modelID_H; + + // If the player is horde but there are no values for the horde modelid - take the alliance modelid + if (!modelid && Player::TeamForRace(getRace()) == HORDE) + modelid = formEntry->modelID_A; + } + } + return modelid; + } } return 0; } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 4c6609fc0f6..c8d3411306a 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2942,6 +2942,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m uint32 modelid = 0; Powers PowerType = POWER_MANA; ShapeshiftForm form = ShapeshiftForm(GetMiscValue()); + switch(form) { case FORM_CAT: |