Erik Strandberg authored and Aokromes committed 2017-12-10 00:37:21 +00:00
1 parent dcc4d29276
commit a3b16c040b
122 files changed
+6029 -5246

No files matched your search

+17 -21
View File
@@ -147,14 +147,12 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
{
if (unit)
{
unit->AI()->sGossipSelectCode(_player, menuId, gossipListId, code.c_str());
if (!sScriptMgr->OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
if (!unit->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str()))
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
{
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
if (!sScriptMgr->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
if (!go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str()))
_player->OnGossipSelect(go, gossipListId, menuId);
}
}
@@ -162,14 +160,12 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
{
if (unit)
{
unit->AI()->sGossipSelect(_player, menuId, gossipListId);
if (!sScriptMgr->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
if (!unit->AI()->GossipSelect(_player, menuId, gossipListId))
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
{
go->AI()->GossipSelect(_player, menuId, gossipListId);
if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
if (!go->AI()->GossipSelect(_player, menuId, gossipListId))
_player->OnGossipSelect(go, gossipListId, menuId);
}
}
@@ -618,19 +614,19 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recvData)
if (!GetPlayer()->IsResurrectRequestedBy(guid))
return;
if (Player* ressPlayer = ObjectAccessor::GetPlayer(*GetPlayer(), guid))
{
if (InstanceScript* instance = ressPlayer->GetInstanceScript())
{
if ((instance->IsEncounterInProgress() && ressPlayer->GetMap()->IsRaid()))
{
if (!instance->GetCombatResurrectionCharges())
return;
else
instance->UseCombatResurrection();
}
}
}
if (Player* ressPlayer = ObjectAccessor::GetPlayer(*GetPlayer(), guid))
{
if (InstanceScript* instance = ressPlayer->GetInstanceScript())
{
if ((instance->IsEncounterInProgress() && ressPlayer->GetMap()->IsRaid()))
{
if (!instance->GetCombatResurrectionCharges())
return;
else
instance->UseCombatResurrection();
}
}
}
GetPlayer()->ResurrectUsingRequestData();
}