Merge MaNGOS, Gossip System. Autor NoFantasy.

* DB support required
* Closes #859

--HG--
branch : trunk
This commit is contained in:
win32
2009-12-20 13:35:08 +02:00
parent 31c6b10a19
commit 7c9f6b4bc3
77 changed files with 1138 additions and 849 deletions

View File

@@ -79,14 +79,14 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 option;
uint32 unk;
uint32 gossipListId;
uint32 menuId;
uint64 guid;
std::string code = "";
recv_data >> guid >> unk >> option;
recv_data >> guid >> menuId >> gossipListId;
if(_player->PlayerTalkClass->GossipOptionCoded( option ))
if(_player->PlayerTalkClass->GossipOptionCoded(gossipListId))
{
// recheck
sLog.outBasic("reading string");
@@ -128,21 +128,21 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
{
if(unit)
{
if(!Script->GossipSelectWithCode( _player, unit, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option ), code.c_str()) )
unit->OnGossipSelect( _player, option );
if(!Script->GossipSelectWithCode( _player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()) )
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
Script->GOSelectWithCode( _player, go, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option ), code.c_str());
Script->GOSelectWithCode( _player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str());
}
else
{
if(unit)
{
if(!Script->GossipSelect( _player, unit, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )) )
unit->OnGossipSelect( _player, option );
if(!Script->GossipSelect( _player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)) )
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
Script->GOSelect( _player, go, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option ));
Script->GOSelect( _player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId));
}
}