Add "On" to some gossip methods in AI
Port From (https://github.com/TrinityCore/TrinityCore/commit/bc04acb72652882290cef49b2055d3cf1ab12f36)
This commit is contained in:
@@ -527,22 +527,22 @@ namespace Game.AI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Called when a player opens a gossip dialog with the creature.
|
// Called when a player opens a gossip dialog with the creature.
|
||||||
public virtual bool GossipHello(Player player) { return false; }
|
public virtual bool OnGossipHello(Player player) { return false; }
|
||||||
|
|
||||||
// Called when a player selects a gossip item in the creature's gossip menu.
|
// Called when a player selects a gossip item in the creature's gossip menu.
|
||||||
public virtual bool GossipSelect(Player player, uint menuId, uint gossipListId) { return false; }
|
public virtual bool OnGossipSelect(Player player, uint menuId, uint gossipListId) { return false; }
|
||||||
|
|
||||||
// Called when a player selects a gossip with a code in the creature's gossip menu.
|
// Called when a player selects a gossip with a code in the creature's gossip menu.
|
||||||
public virtual bool GossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
public virtual bool OnGossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when a player accepts a quest from the creature.
|
// Called when a player accepts a quest from the creature.
|
||||||
public virtual void QuestAccept(Player player, Quest quest) { }
|
public virtual void OnQuestAccept(Player player, Quest quest) { }
|
||||||
|
|
||||||
// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||||
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
public virtual void OnQuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
||||||
|
|
||||||
/// == Waypoints system =============================
|
/// == Waypoints system =============================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -55,27 +55,27 @@ namespace Game.AI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a player opens a gossip dialog with the gameobject.
|
/// Called when a player opens a gossip dialog with the gameobject.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool GossipHello(Player player) { return false; }
|
public virtual bool OnGossipHello(Player player) { return false; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a player selects a gossip item in the gameobject's gossip menu.
|
/// Called when a player selects a gossip item in the gameobject's gossip menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool GossipSelect(Player player, uint menuId, uint gossipListId) { return false; }
|
public virtual bool OnGossipSelect(Player player, uint menuId, uint gossipListId) { return false; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a player selects a gossip with a code in the gameobject's gossip menu.
|
/// Called when a player selects a gossip with a code in the gameobject's gossip menu.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool GossipSelectCode(Player player, uint sender, uint action, string code) { return false; }
|
public virtual bool OnGossipSelectCode(Player player, uint sender, uint action, string code) { return false; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a player accepts a quest from the gameobject.
|
/// Called when a player accepts a quest from the gameobject.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void QuestAccept(Player player, Quest quest) { }
|
public virtual void OnQuestAccept(Player player, Quest quest) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
/// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
public virtual void OnQuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
||||||
|
|
||||||
// Called when a Player clicks a GameObject, before GossipHello
|
// Called when a Player clicks a GameObject, before GossipHello
|
||||||
// prevents achievement tracking if returning true
|
// prevents achievement tracking if returning true
|
||||||
|
|||||||
@@ -802,31 +802,31 @@ namespace Game.AI
|
|||||||
_evadeDisabled = disable;
|
_evadeDisabled = disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
_gossipReturn = false;
|
_gossipReturn = false;
|
||||||
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player);
|
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player);
|
||||||
return _gossipReturn;
|
return _gossipReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||||
{
|
{
|
||||||
_gossipReturn = false;
|
_gossipReturn = false;
|
||||||
GetScript().ProcessEventsFor(SmartEvents.GossipSelect, player, menuId, gossipListId);
|
GetScript().ProcessEventsFor(SmartEvents.GossipSelect, player, menuId, gossipListId);
|
||||||
return _gossipReturn;
|
return _gossipReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
public override bool OnGossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void QuestAccept(Player player, Quest quest)
|
public override void OnQuestAccept(Player player, Quest quest)
|
||||||
{
|
{
|
||||||
GetScript().ProcessEventsFor(SmartEvents.AcceptedQuest, player, quest.Id);
|
GetScript().ProcessEventsFor(SmartEvents.AcceptedQuest, player, quest.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void QuestReward(Player player, Quest quest, LootItemType type, uint opt)
|
public override void OnQuestReward(Player player, Quest quest, LootItemType type, uint opt)
|
||||||
{
|
{
|
||||||
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt);
|
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt);
|
||||||
}
|
}
|
||||||
@@ -1116,13 +1116,35 @@ namespace Game.AI
|
|||||||
GetScript().OnReset();
|
GetScript().OnReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
_gossipReturn = false;
|
_gossipReturn = false;
|
||||||
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player, 0, 0, false, null, me);
|
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player, 0, 0, false, null, me);
|
||||||
return _gossipReturn;
|
return _gossipReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||||
|
{
|
||||||
|
_gossipReturn = false;
|
||||||
|
GetScript().ProcessEventsFor(SmartEvents.GossipSelect, player, menuId, gossipListId, false, null, me);
|
||||||
|
return _gossipReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool OnGossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnQuestAccept(Player player, Quest quest)
|
||||||
|
{
|
||||||
|
GetScript().ProcessEventsFor(SmartEvents.AcceptedQuest, player, quest.Id, 0, false, null, me);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnQuestReward(Player player, Quest quest, LootItemType type, uint opt)
|
||||||
|
{
|
||||||
|
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt, false, null, me);
|
||||||
|
}
|
||||||
|
|
||||||
public override bool OnReportUse(Player player)
|
public override bool OnReportUse(Player player)
|
||||||
{
|
{
|
||||||
_gossipReturn = false;
|
_gossipReturn = false;
|
||||||
@@ -1130,28 +1152,6 @@ namespace Game.AI
|
|||||||
return _gossipReturn;
|
return _gossipReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
|
||||||
{
|
|
||||||
_gossipReturn = false;
|
|
||||||
GetScript().ProcessEventsFor(SmartEvents.GossipSelect, player, menuId, gossipListId, false, null, me);
|
|
||||||
return _gossipReturn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool GossipSelectCode(Player player, uint menuId, uint gossipListId, string code)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void QuestAccept(Player player, Quest quest)
|
|
||||||
{
|
|
||||||
GetScript().ProcessEventsFor(SmartEvents.AcceptedQuest, player, quest.Id, 0, false, null, me);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void QuestReward(Player player, Quest quest, LootItemType type, uint opt)
|
|
||||||
{
|
|
||||||
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt, false, null, me);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Destroyed(WorldObject attacker, uint eventId)
|
public override void Destroyed(WorldObject attacker, uint eventId)
|
||||||
{
|
{
|
||||||
GetScript().ProcessEventsFor(SmartEvents.Death, attacker != null ? attacker.ToUnit() : null, eventId, 0, false, null, me);
|
GetScript().ProcessEventsFor(SmartEvents.Death, attacker != null ? attacker.ToUnit() : null, eventId, 0, false, null, me);
|
||||||
|
|||||||
@@ -1485,7 +1485,7 @@ namespace Game.Entities
|
|||||||
playerUser.RemoveAurasByType(AuraType.Mounted);
|
playerUser.RemoveAurasByType(AuraType.Mounted);
|
||||||
|
|
||||||
playerUser.PlayerTalkClass.ClearMenus();
|
playerUser.PlayerTalkClass.ClearMenus();
|
||||||
if (GetAI().GossipHello(playerUser))
|
if (GetAI().OnGossipHello(playerUser))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
case TypeId.Unit:
|
case TypeId.Unit:
|
||||||
PlayerTalkClass.ClearMenus();
|
PlayerTalkClass.ClearMenus();
|
||||||
questGiver.ToCreature().GetAI().QuestAccept(this, quest);
|
questGiver.ToCreature().GetAI().OnQuestAccept(this, quest);
|
||||||
break;
|
break;
|
||||||
case TypeId.Item:
|
case TypeId.Item:
|
||||||
case TypeId.Container:
|
case TypeId.Container:
|
||||||
@@ -726,7 +726,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
case TypeId.GameObject:
|
case TypeId.GameObject:
|
||||||
PlayerTalkClass.ClearMenus();
|
PlayerTalkClass.ClearMenus();
|
||||||
questGiver.ToGameObject().GetAI().QuestAccept(this, quest);
|
questGiver.ToGameObject().GetAI().OnQuestAccept(this, quest);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
_player.PlayerTalkClass.ClearMenus();
|
_player.PlayerTalkClass.ClearMenus();
|
||||||
if (!unit.GetAI().GossipHello(_player))
|
if (!unit.GetAI().OnGossipHello(_player))
|
||||||
{
|
{
|
||||||
GetPlayer().PrepareGossipMenu(unit, unit.GetCreatureTemplate().GossipMenuId, true);
|
GetPlayer().PrepareGossipMenu(unit, unit.GetCreatureTemplate().GossipMenuId, true);
|
||||||
GetPlayer().SendPreparedGossip(unit);
|
GetPlayer().SendPreparedGossip(unit);
|
||||||
@@ -222,12 +222,12 @@ namespace Game
|
|||||||
{
|
{
|
||||||
if (unit != null)
|
if (unit != null)
|
||||||
{
|
{
|
||||||
if (!unit.GetAI().GossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
|
if (!unit.GetAI().OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
|
||||||
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!go.GetAI().GossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
|
if (!go.GetAI().OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
|
||||||
_player.OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
_player.OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,12 +235,12 @@ namespace Game
|
|||||||
{
|
{
|
||||||
if (unit != null)
|
if (unit != null)
|
||||||
{
|
{
|
||||||
if (!unit.GetAI().GossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
if (!unit.GetAI().OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
||||||
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!go.GetAI().GossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
if (!go.GetAI().OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
||||||
GetPlayer().OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
GetPlayer().OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace Game
|
|||||||
creature.SetHomePosition(creature.GetPosition());
|
creature.SetHomePosition(creature.GetPosition());
|
||||||
|
|
||||||
_player.PlayerTalkClass.ClearMenus();
|
_player.PlayerTalkClass.ClearMenus();
|
||||||
if (creature.GetAI().GossipHello(_player))
|
if (creature.GetAI().OnGossipHello(_player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetPlayer().PrepareGossipMenu(creature, creature.GetCreatureTemplate().GossipMenuId, true);
|
GetPlayer().PrepareGossipMenu(creature, creature.GetCreatureTemplate().GossipMenuId, true);
|
||||||
@@ -379,7 +379,7 @@ namespace Game
|
|||||||
_player.PlayerTalkClass.ClearMenus();
|
_player.PlayerTalkClass.ClearMenus();
|
||||||
Creature creatureQGiver = obj.ToCreature();
|
Creature creatureQGiver = obj.ToCreature();
|
||||||
if (creatureQGiver != null)
|
if (creatureQGiver != null)
|
||||||
creatureQGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
creatureQGiver.GetAI().OnQuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeId.GameObject:
|
case TypeId.GameObject:
|
||||||
@@ -400,7 +400,7 @@ namespace Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
_player.PlayerTalkClass.ClearMenus();
|
_player.PlayerTalkClass.ClearMenus();
|
||||||
questGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
questGiver.GetAI().OnQuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ namespace Game
|
|||||||
GameObject go = GetPlayer().GetGameObjectIfCanInteractWith(packet.Guid);
|
GameObject go = GetPlayer().GetGameObjectIfCanInteractWith(packet.Guid);
|
||||||
if (go)
|
if (go)
|
||||||
{
|
{
|
||||||
if (go.GetAI().GossipHello(GetPlayer()))
|
if (go.GetAI().OnGossipHello(GetPlayer()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetPlayer().UpdateCriteria(CriteriaType.UseGameobject, go.GetEntry());
|
GetPlayer().UpdateCriteria(CriteriaType.UseGameobject, go.GetEntry());
|
||||||
|
|||||||
@@ -1199,7 +1199,7 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
player.PlayerTalkClass.ClearMenus();
|
player.PlayerTalkClass.ClearMenus();
|
||||||
if (gameObjTarget.GetAI().GossipHello(player))
|
if (gameObjTarget.GetAI().OnGossipHello(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (gameObjTarget.GetGoType())
|
switch (gameObjTarget.GetGoType())
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_gilded_brazier(GameObject go) : base(go) { }
|
public go_gilded_brazier(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (me.GetGoType() == GameObjectTypes.Goober)
|
if (me.GetGoType() == GameObjectTypes.Goober)
|
||||||
{
|
{
|
||||||
@@ -328,7 +328,7 @@ namespace Scripts.World.GameObjects
|
|||||||
public go_tablet_of_the_seven(GameObject go) : base(go) { }
|
public go_tablet_of_the_seven(GameObject go) : base(go) { }
|
||||||
|
|
||||||
/// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
|
/// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (me.GetGoType() != GameObjectTypes.QuestGiver)
|
if (me.GetGoType() != GameObjectTypes.QuestGiver)
|
||||||
return true;
|
return true;
|
||||||
@@ -345,7 +345,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_ethereum_prison(GameObject go) : base(go) { }
|
public go_ethereum_prison(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.UseDoorOrButton();
|
me.UseDoorOrButton();
|
||||||
int Random = (int)(RandomHelper.Rand32() % (CreatureIds.PrisonEntry.Length / sizeof(uint)));
|
int Random = (int)(RandomHelper.Rand32() % (CreatureIds.PrisonEntry.Length / sizeof(uint)));
|
||||||
@@ -399,7 +399,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_ethereum_stasis(GameObject go) : base(go) { }
|
public go_ethereum_stasis(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.UseDoorOrButton();
|
me.UseDoorOrButton();
|
||||||
int Random = (int)(RandomHelper.Rand32() % CreatureIds.StasisEntry.Length / sizeof(uint));
|
int Random = (int)(RandomHelper.Rand32() % CreatureIds.StasisEntry.Length / sizeof(uint));
|
||||||
@@ -415,7 +415,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_resonite_cask(GameObject go) : base(go) { }
|
public go_resonite_cask(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (me.GetGoType() == GameObjectTypes.Goober)
|
if (me.GetGoType() == GameObjectTypes.Goober)
|
||||||
me.SummonCreature(CreatureIds.Goggeroc, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromMinutes(5));
|
me.SummonCreature(CreatureIds.Goggeroc, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromMinutes(5));
|
||||||
@@ -429,7 +429,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_southfury_moonstone(GameObject go) : base(go) { }
|
public go_southfury_moonstone(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
|
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
|
||||||
//player.CastSpell(player, SpellSummonRizzle, false);
|
//player.CastSpell(player, SpellSummonRizzle, false);
|
||||||
@@ -447,7 +447,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_tele_to_dalaran_crystal(GameObject go) : base(go) { }
|
public go_tele_to_dalaran_crystal(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (player.GetQuestRewardStatus(QuestIds.TeleCrystalFlag))
|
if (player.GetQuestRewardStatus(QuestIds.TeleCrystalFlag))
|
||||||
return false;
|
return false;
|
||||||
@@ -462,7 +462,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_tele_to_violet_stand(GameObject go) : base(go) { }
|
public go_tele_to_violet_stand(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (player.GetQuestRewardStatus(QuestIds.LearnLeaveReturn) || player.GetQuestStatus(QuestIds.LearnLeaveReturn) == QuestStatus.Incomplete)
|
if (player.GetQuestRewardStatus(QuestIds.LearnLeaveReturn) || player.GetQuestStatus(QuestIds.LearnLeaveReturn) == QuestStatus.Incomplete)
|
||||||
return false;
|
return false;
|
||||||
@@ -476,7 +476,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_matrix_punchograph(GameObject go) : base(go) { }
|
public go_matrix_punchograph(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
switch (me.GetEntry())
|
switch (me.GetEntry())
|
||||||
{
|
{
|
||||||
@@ -520,7 +520,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_scourge_cage(GameObject go) : base(go) { }
|
public go_scourge_cage(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.UseDoorOrButton();
|
me.UseDoorOrButton();
|
||||||
Creature pNearestPrisoner = me.FindNearestCreature(CreatureIds.ScourgePrisoner, 5.0f, true);
|
Creature pNearestPrisoner = me.FindNearestCreature(CreatureIds.ScourgePrisoner, 5.0f, true);
|
||||||
@@ -539,7 +539,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_arcane_prison(GameObject go) : base(go) { }
|
public go_arcane_prison(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (player.GetQuestStatus(QuestIds.PrisonBreak) == QuestStatus.Incomplete)
|
if (player.GetQuestStatus(QuestIds.PrisonBreak) == QuestStatus.Incomplete)
|
||||||
{
|
{
|
||||||
@@ -556,7 +556,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_blood_filled_orb(GameObject go) : base(go) { }
|
public go_blood_filled_orb(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (me.GetGoType() == GameObjectTypes.Goober)
|
if (me.GetGoType() == GameObjectTypes.Goober)
|
||||||
player.SummonCreature(CreatureIds.Zelemar, -369.746f, 166.759f, -21.50f, 5.235f, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(30));
|
player.SummonCreature(CreatureIds.Zelemar, -369.746f, 166.759f, -21.50f, 5.235f, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(30));
|
||||||
@@ -570,7 +570,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_table_theka(GameObject go) : base(go) { }
|
public go_table_theka(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
if (player.GetQuestStatus(QuestIds.SpiderGold) == QuestStatus.Incomplete)
|
if (player.GetQuestStatus(QuestIds.SpiderGold) == QuestStatus.Incomplete)
|
||||||
player.AreaExploredOrEventHappens(QuestIds.SpiderGold);
|
player.AreaExploredOrEventHappens(QuestIds.SpiderGold);
|
||||||
@@ -585,7 +585,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_soulwell(GameObject go) : base(go) { }
|
public go_soulwell(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
Unit owner = me.GetOwner();
|
Unit owner = me.GetOwner();
|
||||||
if (!owner || !owner.IsTypeId(TypeId.Player) || !player.IsInSameRaidWith(owner.ToPlayer()))
|
if (!owner || !owner.IsTypeId(TypeId.Player) || !player.IsInSameRaidWith(owner.ToPlayer()))
|
||||||
@@ -599,7 +599,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_amberpine_outhouse(GameObject go) : base(go) { }
|
public go_amberpine_outhouse(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
QuestStatus status = player.GetQuestStatus(QuestIds.DoingYourDuty);
|
QuestStatus status = player.GetQuestStatus(QuestIds.DoingYourDuty);
|
||||||
if (status == QuestStatus.Incomplete || status == QuestStatus.Complete || status == QuestStatus.Rewarded)
|
if (status == QuestStatus.Incomplete || status == QuestStatus.Complete || status == QuestStatus.Rewarded)
|
||||||
@@ -613,7 +613,7 @@ namespace Scripts.World.GameObjects
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GossipSelect(Player player, uint menuId, uint gossipListId)
|
public override bool OnGossipSelect(Player player, uint menuId, uint gossipListId)
|
||||||
{
|
{
|
||||||
uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId);
|
uint action = player.PlayerTalkClass.GetGossipOptionAction(gossipListId);
|
||||||
player.ClearGossipMenu();
|
player.ClearGossipMenu();
|
||||||
@@ -645,7 +645,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_hive_pod(GameObject go) : base(go) { }
|
public go_hive_pod(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
player.SendLoot(me.GetGUID(), LootType.Corpse);
|
player.SendLoot(me.GetGUID(), LootType.Corpse);
|
||||||
me.SummonCreature(CreatureIds.HiveAmbusher, me.GetPositionX() + 1, me.GetPositionY(), me.GetPositionZ(), me.GetAbsoluteAngle(player), TempSummonType.TimedOrDeadDespawn, TimeSpan.FromMinutes(1));
|
me.SummonCreature(CreatureIds.HiveAmbusher, me.GetPositionX() + 1, me.GetPositionY(), me.GetPositionZ(), me.GetAbsoluteAngle(player), TempSummonType.TimedOrDeadDespawn, TimeSpan.FromMinutes(1));
|
||||||
@@ -659,7 +659,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_massive_seaforium_charge(GameObject go) : base(go) { }
|
public go_massive_seaforium_charge(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.SetLootState(LootState.JustDeactivated);
|
me.SetLootState(LootState.JustDeactivated);
|
||||||
return true;
|
return true;
|
||||||
@@ -671,7 +671,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_veil_skith_cage(GameObject go) : base(go) { }
|
public go_veil_skith_cage(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.UseDoorOrButton();
|
me.UseDoorOrButton();
|
||||||
if (player.GetQuestStatus(QuestIds.MissingFriends) == QuestStatus.Incomplete)
|
if (player.GetQuestStatus(QuestIds.MissingFriends) == QuestStatus.Incomplete)
|
||||||
@@ -696,7 +696,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_frostblade_shrine(GameObject go) : base(go) { }
|
public go_frostblade_shrine(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
me.UseDoorOrButton(10);
|
me.UseDoorOrButton(10);
|
||||||
if (!player.HasAura(SpellIds.RecentMeditation))
|
if (!player.HasAura(SpellIds.RecentMeditation))
|
||||||
@@ -716,7 +716,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_midsummer_bonfire(GameObject go) : base(go) { }
|
public go_midsummer_bonfire(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipSelect(Player player, uint menuId, uint ssipListId)
|
public override bool OnGossipSelect(Player player, uint menuId, uint ssipListId)
|
||||||
{
|
{
|
||||||
player.CastSpell(player, SpellIds.StampOutBonfireQuestComplete, true);
|
player.CastSpell(player, SpellIds.StampOutBonfireQuestComplete, true);
|
||||||
player.CloseGossipMenu();
|
player.CloseGossipMenu();
|
||||||
@@ -729,7 +729,7 @@ namespace Scripts.World.GameObjects
|
|||||||
{
|
{
|
||||||
public go_midsummer_ribbon_pole(GameObject go) : base(go) { }
|
public go_midsummer_ribbon_pole(GameObject go) : base(go) { }
|
||||||
|
|
||||||
public override bool GossipHello(Player player)
|
public override bool OnGossipHello(Player player)
|
||||||
{
|
{
|
||||||
Creature creature = me.FindNearestCreature(CreatureIds.PoleRibbonBunny, 10.0f);
|
Creature creature = me.FindNearestCreature(CreatureIds.PoleRibbonBunny, 10.0f);
|
||||||
if (creature)
|
if (creature)
|
||||||
|
|||||||
Reference in New Issue
Block a user