diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/DataStores/DBCEnums.h | 3 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/TemporarySummon.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Item/ItemTemplate.h | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 18 | ||||
| -rw-r--r-- | src/server/game/Entities/Transport/Transport.cpp | 18 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Miscellaneous/SharedDefines.h | 59 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 20 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 4 |
9 files changed, 81 insertions, 51 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 23ca948431c..ce41455e934 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -1335,7 +1335,8 @@ enum SummonPropFlags SUMMON_PROP_FLAG_UNK18 = 0x00020000, SUMMON_PROP_FLAG_UNK19 = 0x00040000, SUMMON_PROP_FLAG_UNK20 = 0x00080000, - SUMMON_PROP_FLAG_UNK21 = 0x00100000 // Totems + SUMMON_PROP_FLAG_UNK21 = 0x00100000, // Totems + SUMMON_PROP_FLAG_COMPANION = 0x00200000 }; #define MAX_TALENT_TIERS 7 diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 7b7afe2e54c..63578dfd872 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -331,7 +331,7 @@ Guardian::Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool is { memset(m_statFromOwner, 0, sizeof(float)*MAX_STATS); m_unitTypeMask |= UNIT_MASK_GUARDIAN; - if (properties && (properties->Title == SUMMON_TYPE_PET || properties->Control == SUMMON_CATEGORY_PET)) + if (properties && (SummonTitle(properties->Title) == SummonTitle::Pet || properties->Control == SUMMON_CATEGORY_PET)) { m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN; InitCharmInfo(); diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index 4b3bbda378d..df57ffe6d95 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -651,9 +651,9 @@ enum ItemSubclassPermanent enum ItemSubclassJunk { - ITEM_SUBCLASS_MISCELLANEOUS_JUNK = 0, + ITEM_SUBCLASS_MISCELLANEOUS_JUNK = 0, ITEM_SUBCLASS_MISCELLANEOUS_REAGENT = 1, - ITEM_SUBCLASS_MISCELLANEOUS_COMPANION_PET = 2, + ITEM_SUBCLASS_MISCELLANEOUS_COMPANION_PET = 2, ITEM_SUBCLASS_MISCELLANEOUS_HOLIDAY = 3, ITEM_SUBCLASS_MISCELLANEOUS_OTHER = 4, ITEM_SUBCLASS_MISCELLANEOUS_MOUNT = 5, diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 042e17f3ed8..645cfb92e5f 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1695,22 +1695,22 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert case SUMMON_CATEGORY_ALLY: case SUMMON_CATEGORY_UNK: { - switch (properties->Title) + switch (SummonTitle(properties->Title)) { - case SUMMON_TYPE_MINION: - case SUMMON_TYPE_GUARDIAN: - case SUMMON_TYPE_GUARDIAN2: + case SummonTitle::Minion: + case SummonTitle::Guardian: + case SummonTitle::Runeblade: mask = UNIT_MASK_GUARDIAN; break; - case SUMMON_TYPE_TOTEM: - case SUMMON_TYPE_LIGHTWELL: + case SummonTitle::Totem: + case SummonTitle::Lightwell: mask = UNIT_MASK_TOTEM; break; - case SUMMON_TYPE_VEHICLE: - case SUMMON_TYPE_VEHICLE2: + case SummonTitle::Vehicle: + case SummonTitle::Mount: mask = UNIT_MASK_SUMMON; break; - case SUMMON_TYPE_MINIPET: + case SummonTitle::Companion: mask = UNIT_MASK_MINION; break; default: diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 960fa41662f..c4c7d2a971d 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -412,22 +412,22 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu case SUMMON_CATEGORY_ALLY: case SUMMON_CATEGORY_UNK: { - switch (properties->Title) + switch (SummonTitle(properties->Title)) { - case SUMMON_TYPE_MINION: - case SUMMON_TYPE_GUARDIAN: - case SUMMON_TYPE_GUARDIAN2: + case SummonTitle::Minion: + case SummonTitle::Guardian: + case SummonTitle::Runeblade: mask = UNIT_MASK_GUARDIAN; break; - case SUMMON_TYPE_TOTEM: - case SUMMON_TYPE_LIGHTWELL: + case SummonTitle::Totem: + case SummonTitle::Lightwell: mask = UNIT_MASK_TOTEM; break; - case SUMMON_TYPE_VEHICLE: - case SUMMON_TYPE_VEHICLE2: + case SummonTitle::Vehicle: + case SummonTitle::Mount: mask = UNIT_MASK_SUMMON; break; - case SUMMON_TYPE_MINIPET: + case SummonTitle::Companion: mask = UNIT_MASK_MINION; break; default: diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a658c524fdc..cf86f82f55c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6063,7 +6063,7 @@ void Unit::SetMinion(Minion *minion, bool apply) SetMinionGUID(minion->GetGUID()); } - if (minion->m_Properties && minion->m_Properties->Title == SUMMON_TYPE_MINIPET) + if (minion->m_Properties && SummonTitle(minion->m_Properties->Title) == SummonTitle::Companion) { SetCritterGUID(minion->GetGUID()); if (Player const* thisPlayer = ToPlayer()) @@ -6094,7 +6094,7 @@ void Unit::SetMinion(Minion *minion, bool apply) m_Controlled.erase(minion); - if (minion->m_Properties && minion->m_Properties->Title == SUMMON_TYPE_MINIPET) + if (minion->m_Properties && SummonTitle(minion->m_Properties->Title) == SummonTitle::Companion) if (GetCritterGUID() == minion->GetGUID()) SetCritterGUID(ObjectGuid::Empty); diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 96eefe37126..1edeb4218fe 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -4852,22 +4852,51 @@ enum SummonCategory // uses this category }; -enum SummonType +enum class SummonTitle : int32 { - SUMMON_TYPE_NONE = 0, - SUMMON_TYPE_PET = 1, - SUMMON_TYPE_GUARDIAN = 2, - SUMMON_TYPE_MINION = 3, - SUMMON_TYPE_TOTEM = 4, - SUMMON_TYPE_MINIPET = 5, - SUMMON_TYPE_GUARDIAN2 = 6, - SUMMON_TYPE_WILD2 = 7, - SUMMON_TYPE_WILD3 = 8, // Related to phases and DK prequest line (3.3.5a) - SUMMON_TYPE_VEHICLE = 9, - SUMMON_TYPE_VEHICLE2 = 10, // Oculus and Argent Tournament vehicles (3.3.5a) - SUMMON_TYPE_LIGHTWELL = 11, - SUMMON_TYPE_JEEVES = 12, - SUMMON_TYPE_UNK13 = 13 + None = 0, + Pet = 1, + Guardian = 2, + Minion = 3, + Totem = 4, + Companion = 5, + Runeblade = 6, + Construct = 7, + Opponent = 8, // Related to phases and DK prequest line (3.3.5a) + Vehicle = 9, + Mount = 10, // Oculus and Argent Tournament vehicles (3.3.5a) + Lightwell = 11, + Butler = 12, + aka = 13, + Gateway = 14, + Hatred = 15, + Statue = 16, + Spirit = 17, + WarBanner = 18, + Heartwarmer = 19, + HiredBy = 20, + PurchasedBy = 21, + Pride = 22, + TwistedImage = 23, + NoodleCart = 24, + InnerDemon = 25, + Bodyguard = 26, + Name = 27, + Squire = 28, + Champion = 29, + TheBetrayer = 30, + EruptingReflection = 31, + HopelessReflection = 32, + MalignantReflection = 33, + WailingReflection = 34, + Assistant = 35, + Enforcer = 36, + Recruit = 37, + Admirer = 38, + EvilTwin = 39, + Greed = 40, + LostMind = 41, + ServantOfNZoth = 44 }; enum EventId diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 97fb555fe21..6acb790d8e8 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1967,21 +1967,21 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) SummonGuardian(effIndex, entry, properties, numSummons); break; } - switch (properties->Title) + switch (SummonTitle(properties->Title)) { - case SUMMON_TYPE_PET: - case SUMMON_TYPE_GUARDIAN: - case SUMMON_TYPE_GUARDIAN2: - case SUMMON_TYPE_MINION: + case SummonTitle::Pet: + case SummonTitle::Guardian: + case SummonTitle::Runeblade: + case SummonTitle::Minion: SummonGuardian(effIndex, entry, properties, numSummons); break; // Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE) - case SUMMON_TYPE_VEHICLE: - case SUMMON_TYPE_VEHICLE2: + case SummonTitle::Vehicle: + case SummonTitle::Mount: summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id); break; - case SUMMON_TYPE_LIGHTWELL: - case SUMMON_TYPE_TOTEM: + case SummonTitle::Lightwell: + case SummonTitle::Totem: { summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id, 0, personalSpawn); if (!summon || !summon->IsTotem()) @@ -1994,7 +1994,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) } break; } - case SUMMON_TYPE_MINIPET: + case SummonTitle::Companion: { summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id, 0, personalSpawn); if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION)) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ab73f8338a2..e3c405c9e96 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3623,9 +3623,9 @@ void SpellMgr::LoadSpellInfoCorrections() } if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121))) - properties->Title = SUMMON_TYPE_TOTEM; + properties->Title = AsUnderlyingType(SummonTitle::Totem); if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647))) // 52893 - properties->Title = SUMMON_TYPE_TOTEM; + properties->Title = AsUnderlyingType(SummonTitle::Totem); if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(628))) // Hungry Plaguehound properties->Control = SUMMON_CATEGORY_PET; |
