mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
Updated to 3.1.2.9855 client build, fixed quests, some work on monster movement. Not tested.
This commit is contained in:
parent
21a38a42d8
commit
b980e9ac59
22 changed files with 114 additions and 92 deletions
|
|
@ -110,16 +110,17 @@ void WorldSession::HandleQuestgiverHelloOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
CHECK_PACKET_SIZE(recv_data,8+4+4);
|
||||
|
||||
uint64 guid;
|
||||
uint32 quest;
|
||||
recv_data >> guid >> quest;
|
||||
uint32 unk1;
|
||||
recv_data >> guid >> quest >> unk1;
|
||||
|
||||
if(!GetPlayer()->isAlive())
|
||||
return;
|
||||
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u",uint32(GUID_LOPART(guid)), quest, unk1 );
|
||||
|
||||
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
|
||||
|
||||
|
|
@ -206,12 +207,13 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleQuestgiverQuestQueryOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
CHECK_PACKET_SIZE(recv_data,8+4+1);
|
||||
|
||||
uint64 guid;
|
||||
uint32 quest;
|
||||
recv_data >> guid >> quest;
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
||||
uint8 unk1;
|
||||
recv_data >> guid >> quest >> unk1;
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u",uint32(GUID_LOPART(guid)), quest, unk1 );
|
||||
|
||||
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
||||
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM);
|
||||
|
|
@ -407,7 +409,12 @@ void WorldSession::HandleQuestComplete(WorldPacket& recv_data)
|
|||
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
|
||||
}
|
||||
else
|
||||
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
|
||||
{
|
||||
if(pQuest->GetReqItemsCount()) // some items required
|
||||
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
|
||||
else // no items required
|
||||
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue