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
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue