mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Update to latest client build 10505.
Fixed CMSG_AUCTION_SELL_ITEM. Fixed CMSG_BUY_PETITION. Some other fixes.
This commit is contained in:
parent
f865cd7962
commit
3f33946d6a
13 changed files with 96 additions and 51 deletions
|
|
@ -151,8 +151,14 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
|
|||
{
|
||||
uint64 auctioneer, item;
|
||||
uint32 etime, bid, buyout;
|
||||
recv_data >> auctioneer >> item;
|
||||
recv_data >> bid >> buyout >> etime;
|
||||
recv_data >> auctioneer;
|
||||
recv_data.read_skip<uint32>(); // const 1?
|
||||
recv_data >> item;
|
||||
recv_data.read_skip<uint32>(); // unk 3.2.2, const 1?
|
||||
recv_data >> bid;
|
||||
recv_data >> buyout;
|
||||
recv_data >> etime;
|
||||
|
||||
Player *pl = GetPlayer();
|
||||
|
||||
if (!item || !bid || !etime)
|
||||
|
|
@ -172,7 +178,6 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// client send time in minutes, convert to common used sec time
|
||||
etime *= MINUTE;
|
||||
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ enum BattleGroundSpells
|
|||
enum BattleGroundTimeIntervals
|
||||
{
|
||||
RESURRECTION_INTERVAL = 30000, // ms
|
||||
REMIND_INTERVAL = 30000, // ms
|
||||
INVITATION_REMIND_TIME = 60000, // ms
|
||||
INVITE_ACCEPT_WAIT_TIME = 80000, // ms
|
||||
//REMIND_INTERVAL = 10000, // ms
|
||||
INVITATION_REMIND_TIME = 20000, // ms
|
||||
INVITE_ACCEPT_WAIT_TIME = 40000, // ms
|
||||
TIME_TO_AUTOREMOVE = 120000, // ms
|
||||
MAX_OFFLINE_TIME = 300, // secs
|
||||
RESPAWN_ONE_DAY = 86400, // secs
|
||||
|
|
|
|||
|
|
@ -157,11 +157,12 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemStateCommand, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipientCommand, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValueCommand, "", NULL },
|
||||
{ "getitemvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemValueCommand, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32ValueCommand, "", NULL },
|
||||
{ "play", SEC_MODERATOR, false, NULL, "", debugPlayCommandTable },
|
||||
{ "send", SEC_ADMINISTRATOR, false, NULL, "", debugSendCommandTable },
|
||||
{ "setaurastate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetAuraStateCommand, "", NULL },
|
||||
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemFlagCommand, "", NULL },
|
||||
{ "setitemvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemValueCommand, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValueCommand, "", NULL },
|
||||
{ "spellcheck", SEC_CONSOLE, true, &ChatHandler::HandleDebugSpellCheckCommand, "", NULL },
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpawnVehicle, "", NULL },
|
||||
|
|
|
|||
|
|
@ -133,9 +133,10 @@ class ChatHandler
|
|||
bool HandleDebugGetItemStateCommand(const char * args);
|
||||
bool HandleDebugGetLootRecipientCommand(const char * args);
|
||||
bool HandleDebugGetValueCommand(const char* args);
|
||||
bool HandleDebugGetItemValueCommand(const char* args);
|
||||
bool HandleDebugMod32ValueCommand(const char* args);
|
||||
bool HandleDebugSetAuraStateCommand(const char * args);
|
||||
bool HandleDebugSetItemFlagCommand(const char * args);
|
||||
bool HandleDebugSetItemValueCommand(const char * args);
|
||||
bool HandleDebugSetValueCommand(const char* args);
|
||||
bool HandleDebugSpawnVehicle(const char * args);
|
||||
bool HandleDebugSpellCheckCommand(const char* args);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ enum ITEM_FLAGS
|
|||
ITEM_FLAGS_SPECIALUSE = 0x00800000, // last used flag in 2.3.0
|
||||
ITEM_FLAGS_BOA = 0x08000000, // bind on account (set in template for items that can binded in like way)
|
||||
ITEM_FLAGS_ENCHANT_SCROLL = 0x10000000, // for enchant scrolls
|
||||
ITEM_FLAGS_MILLABLE = 0x20000000
|
||||
ITEM_FLAGS_MILLABLE = 0x20000000,
|
||||
ITEM_FLAGS_BOP_TRADEABLE = 0x80000000
|
||||
};
|
||||
|
||||
enum BAG_FAMILY_MASK
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
// not move item from loot to target inventory
|
||||
// now move item from loot to target inventory
|
||||
Item * newitem = target->StoreNewItem( dest, item.itemid, true, item.randomPropertyId );
|
||||
target->SendNewItem(newitem, uint32(item.count), false, false, true );
|
||||
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count);
|
||||
|
|
@ -499,7 +499,6 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
|
|||
item.count=0;
|
||||
item.is_looted=true;
|
||||
|
||||
|
||||
pLoot->NotifyItemRemoved(slotid);
|
||||
--pLoot->unlootedCount;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,30 +48,35 @@
|
|||
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog.outDebug("Received opcode CMSG_PETITION_BUY");
|
||||
//recv_data.hexlike();
|
||||
recv_data.hexlike();
|
||||
|
||||
uint64 guidNPC;
|
||||
uint64 unk1, unk3, unk4, unk5, unk6, unk7;
|
||||
uint32 unk2;
|
||||
std::string name;
|
||||
uint16 unk8;
|
||||
uint8 unk9;
|
||||
uint32 unk10; // selected index
|
||||
uint32 unk11;
|
||||
recv_data >> guidNPC; // NPC GUID
|
||||
recv_data >> unk1; // 0
|
||||
recv_data >> unk2; // 0
|
||||
recv_data >> name; // name
|
||||
|
||||
recv_data >> unk3; // 0
|
||||
recv_data >> unk4; // 0
|
||||
recv_data >> unk5; // 0
|
||||
recv_data >> unk6; // 0
|
||||
recv_data >> unk7; // 0
|
||||
recv_data >> unk8; // 0
|
||||
recv_data >> unk9; // 0
|
||||
recv_data >> unk10; // index
|
||||
recv_data >> unk11; // 0
|
||||
recv_data >> guidNPC; // NPC GUID
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint64>(); // 0
|
||||
recv_data >> name; // name
|
||||
recv_data.read_skip<std::string>(); // some string
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint16>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
recv_data.read_skip<std::string>();
|
||||
|
||||
recv_data >> unk2; // index
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
|
||||
sLog.outDebug("Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
|
||||
|
||||
// prevent cheating
|
||||
|
|
@ -109,7 +114,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
|||
return;
|
||||
}
|
||||
|
||||
switch(unk10)
|
||||
switch(unk2)
|
||||
{
|
||||
case 1:
|
||||
charterid = ARENA_TEAM_CHARTER_2v2;
|
||||
|
|
@ -127,11 +132,11 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
|||
type = 5; // 5v5
|
||||
break;
|
||||
default:
|
||||
sLog.outDebug("unknown selection at buy petition: %u", unk10);
|
||||
sLog.outDebug("unknown selection at buy petition: %u", unk2);
|
||||
return;
|
||||
}
|
||||
|
||||
if(_player->GetArenaTeamId(unk10-1))
|
||||
if(_player->GetArenaTeamId(unk2 - 1))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ALREADY_IN_ARENA_TEAM);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -13794,7 +13794,7 @@ void Player::SendQuestFailed( uint32 quest_id )
|
|||
if( quest_id )
|
||||
{
|
||||
WorldPacket data( SMSG_QUESTGIVER_QUEST_FAILED, 4+4 );
|
||||
data << quest_id;
|
||||
data << uint32(quest_id);
|
||||
data << uint32(0); // failed reason (4 for inventory is full)
|
||||
GetSession()->SendPacket( &data );
|
||||
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
|
||||
|
|
@ -13806,7 +13806,7 @@ void Player::SendQuestTimerFailed( uint32 quest_id )
|
|||
if( quest_id )
|
||||
{
|
||||
WorldPacket data( SMSG_QUESTUPDATE_FAILEDTIMER, 4 );
|
||||
data << quest_id;
|
||||
data << uint32(quest_id);
|
||||
GetSession()->SendPacket( &data );
|
||||
sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
|
||||
}
|
||||
|
|
@ -14225,7 +14225,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(GetMapId());
|
||||
// if server restart after player save in BG or area
|
||||
// player can have current coordinates in to BG/Arean map, fix this
|
||||
// player can have current coordinates in to BG/Arena map, fix this
|
||||
if(!mapEntry || mapEntry->IsBattleGroundOrArena())
|
||||
{
|
||||
const WorldLocation& _loc = GetBattleGroundEntryPoint();
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ enum PlayerFlags
|
|||
PLAYER_FLAGS_UNK23 = 0x00400000,
|
||||
PLAYER_FLAGS_UNK24 = 0x00800000, // disabled all abilitys on tab except autoattack
|
||||
PLAYER_FLAGS_UNK25 = 0x01000000, // disabled all melee ability on tab include autoattack
|
||||
|
||||
PLAYER_FLAGS_NO_XP_GAIN = 0x02000000,
|
||||
};
|
||||
|
||||
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
|||
}
|
||||
}
|
||||
|
||||
WorldPacket data(MSG_CORPSE_QUERY, 1+(5*4));
|
||||
WorldPacket data(MSG_CORPSE_QUERY, 1+(6*4));
|
||||
data << uint8(1); // corpse found
|
||||
data << int32(mapid);
|
||||
data << float(x);
|
||||
|
|
@ -416,10 +416,12 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
uint32 pageID;
|
||||
sLog.outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
recv_data.hexlike();
|
||||
|
||||
uint32 pageID;
|
||||
recv_data >> pageID;
|
||||
sLog.outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY for pageID '%u'", pageID);
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
|
||||
while (pageID)
|
||||
{
|
||||
|
|
@ -461,6 +463,8 @@ void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug( "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY" );
|
||||
|
||||
uint32 unk;
|
||||
recv_data >> unk;
|
||||
|
||||
|
|
|
|||
|
|
@ -657,7 +657,6 @@ bool ChatHandler::HandleDebugSpellCheckCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ChatHandler::HandleDebugSendLargePacketCommand(const char* /*args*/)
|
||||
{
|
||||
const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
|
||||
|
|
@ -678,7 +677,7 @@ bool ChatHandler::HandleDebugSendSetPhaseShiftCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugGetItemValueCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
|
@ -690,14 +689,48 @@ bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
|
|||
return false;
|
||||
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
uint32 flag = (uint32)atoi(f);
|
||||
uint32 index = (uint32)atoi(f);
|
||||
|
||||
Item *i = m_session->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
|
||||
i->SetUInt32Value(ITEM_FIELD_FLAGS, flag);
|
||||
if (index >= i->GetValuesCount())
|
||||
return false;
|
||||
|
||||
uint32 value = i->GetUInt32Value(index);
|
||||
|
||||
PSendSysMessage("Item %u: value at %u is %u", guid, index, value);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugSetItemValueCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* e = strtok((char*)args, " ");
|
||||
char* f = strtok(NULL, " ");
|
||||
char* g = strtok(NULL, " ");
|
||||
|
||||
if (!e || !f || !g)
|
||||
return false;
|
||||
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
uint32 index = (uint32)atoi(f);
|
||||
uint32 value = (uint32)atoi(g);
|
||||
|
||||
Item *i = m_session->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
|
||||
if (index >= i->GetValuesCount())
|
||||
return false;
|
||||
|
||||
i->SetUInt32Value(index, value);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ enum LoginResult
|
|||
|
||||
// we need to stick to 1 version or half of the stuff will work for someone
|
||||
// others will not and opposite
|
||||
// will only support WoW, WoW:TBC and WoW:WotLK 3.2.2 client build 10482...
|
||||
// will only support WoW, WoW:TBC and WoW:WotLK 3.2.2a client build 10505...
|
||||
|
||||
#define EXPECTED_MANGOS_CLIENT_BUILD {10482, 0}
|
||||
#define EXPECTED_MANGOS_CLIENT_BUILD {10505, 0}
|
||||
|
||||
// At update excepted builds please update if need define DEFAULT_MAX_LEVEL
|
||||
// in DBCEnum.h to default max player level expected by build
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
<<<<<<< HEAD
|
||||
#define REVISION_NR "8521"
|
||||
=======
|
||||
#define REVISION_NR "8528"
|
||||
>>>>>>> [8528] Implementing implicit target 49, 50. Thanks to qsa.
|
||||
#define REVISION_NR "8541"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue