Core/GameObject: Implement GameObject::Use case for GAMEOBJECT_TYPE_NEW_FLAG
Port From (https://github.com/TrinityCore/TrinityCore/commit/2a9940e17d4e943aa5d9b95f8f5b54783e14d7b2)
This commit is contained in:
@@ -2005,6 +2005,18 @@ namespace Game.Entities
|
|||||||
player.SetStandState((UnitStandStateType.SitLowChair + (byte)info.BarberChair.chairheight), info.BarberChair.SitAnimKit);
|
player.SetStandState((UnitStandStateType.SitLowChair + (byte)info.BarberChair.chairheight), info.BarberChair.SitAnimKit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case GameObjectTypes.NewFlag:
|
||||||
|
{
|
||||||
|
GameObjectTemplate info = GetGoInfo();
|
||||||
|
if (info == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!user.IsPlayer())
|
||||||
|
return;
|
||||||
|
|
||||||
|
spellId = info.NewFlag.pickupSpell;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GameObjectTypes.ItemForge:
|
case GameObjectTypes.ItemForge:
|
||||||
{
|
{
|
||||||
GameObjectTemplate info = GetGoInfo();
|
GameObjectTemplate info = GetGoInfo();
|
||||||
|
|||||||
@@ -1343,6 +1343,11 @@ namespace Game.Spells
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (goInfo.type == GameObjectTypes.NewFlag)
|
||||||
|
{
|
||||||
|
gameObjTarget.Use(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (m_spellInfo.Id == 1842 && gameObjTarget.GetGoInfo().type == GameObjectTypes.Trap && gameObjTarget.GetOwner() != null)
|
else if (m_spellInfo.Id == 1842 && gameObjTarget.GetGoInfo().type == GameObjectTypes.Trap && gameObjTarget.GetOwner() != null)
|
||||||
{
|
{
|
||||||
gameObjTarget.SetLootState(LootState.JustDeactivated);
|
gameObjTarget.SetLootState(LootState.JustDeactivated);
|
||||||
|
|||||||
Reference in New Issue
Block a user