Core/GameObject: implemented gameobject_overrides table to change faction and flags values on a per-spawn basis
Port From (https://github.com/TrinityCore/TrinityCore/commit/67a1a1d29b76acfcda505fe1a38761a335e93bc5)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1356,13 +1356,17 @@ namespace Game.Entities
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class GameObjectTemplateAddon
|
||||
// From `gameobject_template_addon`, `gameobject_overrides`
|
||||
public class GameObjectOverride
|
||||
{
|
||||
public uint entry;
|
||||
public uint faction;
|
||||
public uint flags;
|
||||
public uint mingold;
|
||||
public uint maxgold;
|
||||
public uint Faction;
|
||||
public GameObjectFlags Flags;
|
||||
}
|
||||
|
||||
public class GameObjectTemplateAddon : GameObjectOverride
|
||||
{
|
||||
public uint Mingold;
|
||||
public uint Maxgold;
|
||||
public uint WorldEffectID;
|
||||
public uint AIAnimKitID;
|
||||
}
|
||||
|
||||
@@ -6084,7 +6084,7 @@ namespace Game.Entities
|
||||
{
|
||||
GameObjectTemplateAddon addon = go.GetTemplateAddon();
|
||||
if (addon != null)
|
||||
loot.GenerateMoneyLoot(addon.mingold, addon.maxgold);
|
||||
loot.GenerateMoneyLoot(addon.Mingold, addon.Maxgold);
|
||||
}
|
||||
|
||||
if (loot_type == LootType.Fishing)
|
||||
|
||||
@@ -115,10 +115,11 @@ namespace Game.Entities
|
||||
_triggeredArrivalEvent = false;
|
||||
_triggeredDepartureEvent = false;
|
||||
|
||||
if (m_goTemplateAddon != null)
|
||||
GameObjectOverride goOverride = GetGameObjectOverride();
|
||||
if (goOverride != null)
|
||||
{
|
||||
SetFaction(m_goTemplateAddon.faction);
|
||||
SetFlags((GameObjectFlags)m_goTemplateAddon.flags);
|
||||
SetFaction(goOverride.Faction);
|
||||
SetFlags(goOverride.Flags);
|
||||
}
|
||||
|
||||
m_goValue.Transport.PathProgress = 0;
|
||||
|
||||
Reference in New Issue
Block a user