mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10635] Convert many opcode handlers to ObjectGuid use.
Also re-enabled anticheating check for bank window open base at .bank command access rights.
This commit is contained in:
parent
0901a4c2ac
commit
851e15c70a
26 changed files with 322 additions and 326 deletions
|
|
@ -8538,17 +8538,17 @@ uint32 Player::GetXPRestBonus(uint32 xp)
|
|||
return rested_bonus;
|
||||
}
|
||||
|
||||
void Player::SetBindPoint(uint64 guid)
|
||||
void Player::SetBindPoint(ObjectGuid guid)
|
||||
{
|
||||
WorldPacket data(SMSG_BINDER_CONFIRM, 8);
|
||||
data << uint64(guid);
|
||||
data << ObjectGuid(guid);
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
void Player::SendTalentWipeConfirm(uint64 guid)
|
||||
void Player::SendTalentWipeConfirm(ObjectGuid guid)
|
||||
{
|
||||
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4));
|
||||
data << uint64(guid);
|
||||
data << ObjectGuid(guid);
|
||||
data << uint32(resetTalentsCost());
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
|
@ -12736,7 +12736,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
|||
canTalkToCredit = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_QUESTGIVER:
|
||||
PrepareQuestMenu(pSource->GetGUID());
|
||||
PrepareQuestMenu(pSource->GetObjectGuid());
|
||||
hasMenuItem = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_ARMORER:
|
||||
|
|
@ -12801,7 +12801,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
|||
{
|
||||
case GOSSIP_OPTION_QUESTGIVER:
|
||||
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
PrepareQuestMenu(pSource->GetGUID());
|
||||
PrepareQuestMenu(pSource->GetObjectGuid());
|
||||
hasMenuItem = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_GOSSIP:
|
||||
|
|
@ -12873,7 +12873,7 @@ void Player::SendPreparedGossip(WorldObject *pSource)
|
|||
// in case no gossip flag and quest menu not empty, open quest menu (client expect gossip menu with this flag)
|
||||
if (!((Creature*)pSource)->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP) && !PlayerTalkClass->GetQuestMenu().Empty())
|
||||
{
|
||||
SendPreparedQuest(pSource->GetGUID());
|
||||
SendPreparedQuest(pSource->GetObjectGuid());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -12882,7 +12882,7 @@ void Player::SendPreparedGossip(WorldObject *pSource)
|
|||
// probably need to find a better way here
|
||||
if (!PlayerTalkClass->GetGossipMenu().GetMenuId() && !PlayerTalkClass->GetQuestMenu().Empty())
|
||||
{
|
||||
SendPreparedQuest(pSource->GetGUID());
|
||||
SendPreparedQuest(pSource->GetObjectGuid());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -12912,7 +12912,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
|||
GossipMenuItem const& menu_item = gossipmenu.GetItem(gossipListId);
|
||||
|
||||
uint32 gossipOptionId = menu_item.m_gOptionId;
|
||||
uint64 guid = pSource->GetGUID();
|
||||
ObjectGuid guid = pSource->GetObjectGuid();
|
||||
uint32 moneyTake = menu_item.m_gBoxMoney;
|
||||
|
||||
// if this function called and player have money for pay MoneyTake or cheating, proccess both cases
|
||||
|
|
@ -13068,7 +13068,7 @@ uint32 Player::GetDefaultGossipMenuForSource(WorldObject *pSource)
|
|||
/*** QUEST SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
void Player::PrepareQuestMenu(uint64 guid)
|
||||
void Player::PrepareQuestMenu(ObjectGuid guid)
|
||||
{
|
||||
QuestRelationsMapBounds rbounds;
|
||||
QuestRelationsMapBounds irbounds;
|
||||
|
|
@ -13128,7 +13128,7 @@ void Player::PrepareQuestMenu(uint64 guid)
|
|||
}
|
||||
}
|
||||
|
||||
void Player::SendPreparedQuest(uint64 guid)
|
||||
void Player::SendPreparedQuest(ObjectGuid guid)
|
||||
{
|
||||
QuestMenu& questMenu = PlayerTalkClass->GetQuestMenu();
|
||||
|
||||
|
|
@ -13236,7 +13236,7 @@ bool Player::IsCurrentQuest( uint32 quest_id ) const
|
|||
return itr->second.m_status == QUEST_STATUS_INCOMPLETE || itr->second.m_status == QUEST_STATUS_COMPLETE && !itr->second.m_rewarded;
|
||||
}
|
||||
|
||||
Quest const* Player::GetNextQuest(uint64 guid, Quest const *pQuest)
|
||||
Quest const* Player::GetNextQuest(ObjectGuid guid, Quest const *pQuest)
|
||||
{
|
||||
QuestRelationsMapBounds rbounds;
|
||||
|
||||
|
|
@ -17453,11 +17453,11 @@ void Player::SetUInt32ValueInArray(Tokens& tokens,uint16 index, uint32 value)
|
|||
tokens[index] = buf;
|
||||
}
|
||||
|
||||
void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair)
|
||||
void Player::Customize(ObjectGuid guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair)
|
||||
{
|
||||
// 0
|
||||
QueryResult* result = CharacterDatabase.PQuery("SELECT playerBytes2 FROM characters WHERE guid = '%u'", GUID_LOPART(guid));
|
||||
if(!result)
|
||||
QueryResult* result = CharacterDatabase.PQuery("SELECT playerBytes2 FROM characters WHERE guid = '%u'", guid.GetCounter());
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
|
@ -17466,7 +17466,7 @@ void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8
|
|||
player_bytes2 &= ~0xFF;
|
||||
player_bytes2 |= facialHair;
|
||||
|
||||
CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, GUID_LOPART(guid));
|
||||
CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, guid.GetCounter());
|
||||
|
||||
delete result;
|
||||
}
|
||||
|
|
@ -20446,7 +20446,7 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
|
|||
void Player::ResurectUsingRequestData()
|
||||
{
|
||||
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
|
||||
if(IS_PLAYER_GUID(m_resurrectGUID))
|
||||
if (m_resurrectGuid.IsPlayer())
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
|
||||
//we cannot resurrect player when we triggered far teleport
|
||||
|
|
@ -21501,14 +21501,13 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
DETAIL_LOG("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
}
|
||||
|
||||
void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
||||
void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRank)
|
||||
{
|
||||
Pet *pet = GetPet();
|
||||
|
||||
if(!pet)
|
||||
if (!pet)
|
||||
return;
|
||||
|
||||
if(petGuid != pet->GetGUID())
|
||||
if (petGuid != pet->GetObjectGuid())
|
||||
return;
|
||||
|
||||
uint32 CurTalentPoints = pet->GetFreeTalentPoints();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue