[9572] Add script calls for GameObject GossipHello and GossipSelect

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-03-11 15:34:37 +01:00
parent c4f3578226
commit dbe089b66d
7 changed files with 76 additions and 9 deletions

View file

@ -930,8 +930,12 @@ void GameObject::Use(Unit* user)
Player* player = (Player*)user;
player->PrepareGossipMenu(this, GetGOInfo()->questgiver.gossipID);
player->SendPreparedGossip(this);
if (!Script->GOGossipHello(player, this))
{
player->PrepareGossipMenu(this, GetGOInfo()->questgiver.gossipID);
player->SendPreparedGossip(this);
}
return;
}
case GAMEOBJECT_TYPE_CHEST:
@ -1037,8 +1041,11 @@ void GameObject::Use(Unit* user)
}
else if (info->goober.gossipID) // ...or gossip, if page does not exist
{
player->PrepareGossipMenu(this, info->goober.gossipID);
player->SendPreparedGossip(this);
if (!Script->GOGossipHello(player, this))
{
player->PrepareGossipMenu(this, info->goober.gossipID);
player->SendPreparedGossip(this);
}
}
if (info->goober.eventId)