Core/Misc: Defined new summon properties titles
Port From (https://github.com/TrinityCore/TrinityCore/commit/3700e0ef5de95dc79290cd16b5abacdd0d490570)
This commit is contained in:
@@ -1557,7 +1557,8 @@ namespace Framework.Constants
|
|||||||
Unk18 = 0x00020000,
|
Unk18 = 0x00020000,
|
||||||
Unk19 = 0x00040000,
|
Unk19 = 0x00040000,
|
||||||
Unk20 = 0x00080000,
|
Unk20 = 0x00080000,
|
||||||
Unk21 = 0x00100000 // Totems
|
Unk21 = 0x00100000, // Totems
|
||||||
|
Companion = 0x00200000
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum TaxiNodeFlags : byte
|
public enum TaxiNodeFlags : byte
|
||||||
|
|||||||
@@ -140,22 +140,51 @@ namespace Framework.Constants
|
|||||||
// uses this category
|
// uses this category
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SummonType
|
public enum SummonTitle
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
Pet = 1,
|
Pet = 1,
|
||||||
Guardian = 2,
|
Guardian = 2,
|
||||||
Minion = 3,
|
Minion = 3,
|
||||||
Totem = 4,
|
Totem = 4,
|
||||||
Minipet = 5,
|
Companion = 5,
|
||||||
Guardian2 = 6,
|
Runeblade = 6,
|
||||||
Wild2 = 7,
|
Construct = 7,
|
||||||
Wild3 = 8, // Related to phases and DK prequest line (3.3.5a)
|
Opponent = 8, // Related to phases and DK prequest line (3.3.5a)
|
||||||
Vehicle = 9,
|
Vehicle = 9,
|
||||||
Vehicle2 = 10, // Oculus and Argent Tournament vehicles (3.3.5a)
|
Mount = 10, // Oculus and Argent Tournament vehicles (3.3.5a)
|
||||||
LightWell = 11,
|
LightWell = 11,
|
||||||
Jeeves = 12,
|
Butler = 12,
|
||||||
Unk13 = 13
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SummonerType
|
public enum SummonerType
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ namespace Game.DataStorage
|
|||||||
public uint Id;
|
public uint Id;
|
||||||
public SummonCategory Control;
|
public SummonCategory Control;
|
||||||
public uint Faction;
|
public uint Faction;
|
||||||
public SummonType Title;
|
public SummonTitle Title;
|
||||||
public int Slot;
|
public int Slot;
|
||||||
public SummonPropFlags Flags;
|
public SummonPropFlags Flags;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ namespace Game.Entities
|
|||||||
m_bonusSpellDamage = 0;
|
m_bonusSpellDamage = 0;
|
||||||
|
|
||||||
UnitTypeMask |= UnitTypeMask.Guardian;
|
UnitTypeMask |= UnitTypeMask.Guardian;
|
||||||
if (properties != null && (properties.Title == SummonType.Pet || properties.Control == SummonCategory.Pet))
|
if (properties != null && (properties.Title == SummonTitle.Pet || properties.Control == SummonCategory.Pet))
|
||||||
{
|
{
|
||||||
UnitTypeMask |= UnitTypeMask.ControlableGuardian;
|
UnitTypeMask |= UnitTypeMask.ControlableGuardian;
|
||||||
InitCharmInfo();
|
InitCharmInfo();
|
||||||
|
|||||||
@@ -420,20 +420,20 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
switch (properties.Title)
|
switch (properties.Title)
|
||||||
{
|
{
|
||||||
case SummonType.Minion:
|
case SummonTitle.Minion:
|
||||||
case SummonType.Guardian:
|
case SummonTitle.Guardian:
|
||||||
case SummonType.Guardian2:
|
case SummonTitle.Runeblade:
|
||||||
mask = UnitTypeMask.Guardian;
|
mask = UnitTypeMask.Guardian;
|
||||||
break;
|
break;
|
||||||
case SummonType.Totem:
|
case SummonTitle.Totem:
|
||||||
case SummonType.LightWell:
|
case SummonTitle.LightWell:
|
||||||
mask = UnitTypeMask.Totem;
|
mask = UnitTypeMask.Totem;
|
||||||
break;
|
break;
|
||||||
case SummonType.Vehicle:
|
case SummonTitle.Vehicle:
|
||||||
case SummonType.Vehicle2:
|
case SummonTitle.Mount:
|
||||||
mask = UnitTypeMask.Summon;
|
mask = UnitTypeMask.Summon;
|
||||||
break;
|
break;
|
||||||
case SummonType.Minipet:
|
case SummonTitle.Companion:
|
||||||
mask = UnitTypeMask.Minion;
|
mask = UnitTypeMask.Minion;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ namespace Game.Entities
|
|||||||
if (GetMinionGUID().IsEmpty())
|
if (GetMinionGUID().IsEmpty())
|
||||||
SetMinionGUID(minion.GetGUID());
|
SetMinionGUID(minion.GetGUID());
|
||||||
|
|
||||||
if (minion.m_Properties != null && minion.m_Properties.Title == SummonType.Minipet)
|
if (minion.m_Properties != null && minion.m_Properties.Title == SummonTitle.Companion)
|
||||||
{
|
{
|
||||||
SetCritterGUID(minion.GetGUID());
|
SetCritterGUID(minion.GetGUID());
|
||||||
Player thisPlayer = ToPlayer();
|
Player thisPlayer = ToPlayer();
|
||||||
@@ -230,7 +230,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
m_Controlled.Remove(minion);
|
m_Controlled.Remove(minion);
|
||||||
|
|
||||||
if (minion.m_Properties != null && minion.m_Properties.Title == SummonType.Minipet)
|
if (minion.m_Properties != null && minion.m_Properties.Title == SummonTitle.Companion)
|
||||||
{
|
{
|
||||||
if (GetCritterGUID() == minion.GetGUID())
|
if (GetCritterGUID() == minion.GetGUID())
|
||||||
SetCritterGUID(ObjectGuid.Empty);
|
SetCritterGUID(ObjectGuid.Empty);
|
||||||
|
|||||||
@@ -3317,20 +3317,20 @@ namespace Game.Maps
|
|||||||
{
|
{
|
||||||
switch (properties.Title)
|
switch (properties.Title)
|
||||||
{
|
{
|
||||||
case SummonType.Minion:
|
case SummonTitle.Minion:
|
||||||
case SummonType.Guardian:
|
case SummonTitle.Guardian:
|
||||||
case SummonType.Guardian2:
|
case SummonTitle.Runeblade:
|
||||||
mask = UnitTypeMask.Guardian;
|
mask = UnitTypeMask.Guardian;
|
||||||
break;
|
break;
|
||||||
case SummonType.Totem:
|
case SummonTitle.Totem:
|
||||||
case SummonType.LightWell:
|
case SummonTitle.LightWell:
|
||||||
mask = UnitTypeMask.Totem;
|
mask = UnitTypeMask.Totem;
|
||||||
break;
|
break;
|
||||||
case SummonType.Vehicle:
|
case SummonTitle.Vehicle:
|
||||||
case SummonType.Vehicle2:
|
case SummonTitle.Mount:
|
||||||
mask = UnitTypeMask.Summon;
|
mask = UnitTypeMask.Summon;
|
||||||
break;
|
break;
|
||||||
case SummonType.Minipet:
|
case SummonTitle.Companion:
|
||||||
mask = UnitTypeMask.Minion;
|
mask = UnitTypeMask.Minion;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1693,19 +1693,19 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
switch (properties.Title)
|
switch (properties.Title)
|
||||||
{
|
{
|
||||||
case SummonType.Pet:
|
case SummonTitle.Pet:
|
||||||
case SummonType.Guardian:
|
case SummonTitle.Guardian:
|
||||||
case SummonType.Guardian2:
|
case SummonTitle.Runeblade:
|
||||||
case SummonType.Minion:
|
case SummonTitle.Minion:
|
||||||
SummonGuardian(effIndex, entry, properties, numSummons);
|
SummonGuardian(effIndex, entry, properties, numSummons);
|
||||||
break;
|
break;
|
||||||
// Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE)
|
// Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE)
|
||||||
case SummonType.Vehicle:
|
case SummonTitle.Vehicle:
|
||||||
case SummonType.Vehicle2:
|
case SummonTitle.Mount:
|
||||||
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id);
|
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id);
|
||||||
break;
|
break;
|
||||||
case SummonType.LightWell:
|
case SummonTitle.LightWell:
|
||||||
case SummonType.Totem:
|
case SummonTitle.Totem:
|
||||||
{
|
{
|
||||||
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id, 0, personalSpawn);
|
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id, 0, personalSpawn);
|
||||||
if (summon == null || !summon.IsTotem())
|
if (summon == null || !summon.IsTotem())
|
||||||
@@ -1718,7 +1718,7 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SummonType.Minipet:
|
case SummonTitle.Companion:
|
||||||
{
|
{
|
||||||
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id, 0, personalSpawn);
|
summon = m_caster.GetMap().SummonCreature(entry, destTarget, properties, (uint)duration, m_originalCaster, m_spellInfo.Id, 0, personalSpawn);
|
||||||
if (summon == null || !summon.HasUnitTypeMask(UnitTypeMask.Minion))
|
if (summon == null || !summon.HasUnitTypeMask(UnitTypeMask.Minion))
|
||||||
|
|||||||
@@ -3025,10 +3025,10 @@ namespace Game.Entities
|
|||||||
|
|
||||||
SummonPropertiesRecord properties = CliDB.SummonPropertiesStorage.LookupByKey(121);
|
SummonPropertiesRecord properties = CliDB.SummonPropertiesStorage.LookupByKey(121);
|
||||||
if (properties != null)
|
if (properties != null)
|
||||||
properties.Title = SummonType.Totem;
|
properties.Title = SummonTitle.Totem;
|
||||||
properties = CliDB.SummonPropertiesStorage.LookupByKey(647); // 52893
|
properties = CliDB.SummonPropertiesStorage.LookupByKey(647); // 52893
|
||||||
if (properties != null)
|
if (properties != null)
|
||||||
properties.Title = SummonType.Totem;
|
properties.Title = SummonTitle.Totem;
|
||||||
properties = CliDB.SummonPropertiesStorage.LookupByKey(628);
|
properties = CliDB.SummonPropertiesStorage.LookupByKey(628);
|
||||||
if (properties != null) // Hungry Plaguehound
|
if (properties != null) // Hungry Plaguehound
|
||||||
properties.Control = SummonCategory.Pet;
|
properties.Control = SummonCategory.Pet;
|
||||||
|
|||||||
Reference in New Issue
Block a user