55 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_BANKER_ACTIVATE");
63 SF_LOG_DEBUG(
"network",
"WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(guid)));
126 SF_LOG_DEBUG(
"network",
"WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
136 size_t count_pos = data.
bitwpos();
146 float fDiscountMod =
_player->GetReputationPriceDiscount(unit);
149 for (TrainerSpellMap::const_iterator itr = trainer_spells->
spellList.begin(); itr != trainer_spells->
spellList.end(); ++itr)
178 for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second && maxReq < 3; ++itr2)
180 data <<
uint32(itr2->second);
207 data.
PutBits(count_pos, count, 19);
217 recvData >> spellId >> trainerId;
227 SF_LOG_DEBUG(
"network",
"WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(guid)));
270 _player->SendPlaySpellVisualKit(362, 1, 0);
276 _player->learnSpell(spellId,
false);
293 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_GOSSIP_HELLO");
302 SF_LOG_DEBUG(
"network",
"WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(guid)));
308 _player->GetReputationMgr().SetVisible(factionTemplateEntry);
336 _player->PlayerTalkClass->ClearMenus();
341 _player->SendPreparedGossip(unit);
388 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
392 recvData.
ReadGuidMask(UnitGUID, 2, 7, 6, 0, 5, 4, 1, 3);
398 SF_LOG_DEBUG(
"network",
"WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(UnitGUID)));
411 _player->ResurrectPlayer(0.5f,
true);
413 _player->DurabilityLossAll(0.25f,
true);
419 corpseGrave =
sObjectMgr->GetClosestGraveYard(
431 if (corpseGrave != ghostGrave)
432 _player->TeleportTo(corpseGrave->
map_id, corpseGrave->
x, corpseGrave->
y, corpseGrave->
z,
_player->GetOrientation());
435 _player->UpdateObjectVisibility();
439 _player->UpdateObjectVisibility();
455 SF_LOG_DEBUG(
"network",
"WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(npcGuid)));
469 if (
GetPlayer()->GetMap()->Instanceable())
477 _player->PlayerTalkClass->SendCloseGossip();
482 SF_LOG_DEBUG(
"network",
"WORLD: Recv CMSG_REQUEST_STABLED_PETS");
519 SF_LOG_DEBUG(
"network",
"WORLD: Recv MSG_LIST_STABLED_PETS Send.");
527 size_t wpos = data.
wpos();
550 Field* fields = result->Fetch();
552 data <<
uint32(fields[1].GetUInt32());
553 data <<
uint32(fields[2].GetUInt32());
554 data <<
uint32(fields[3].GetUInt16());
559 }
while (result->NextRow());
624 Field* fields = result->Fetch();
629 if (slot != freeSlot)
634 }
while (result->NextRow());
637 if (freeSlot > 0 && freeSlot <=
GetPlayer()->m_stableSlots)
648 SF_LOG_DEBUG(
"network",
"WORLD: Recv CMSG_UNSTABLE_PET.");
652 recvData >> npcGUID >> petnumber;
683 Field* fields = result->Fetch();
697 if (creatureInfo && creatureInfo->
IsTameable(
true))
729 SF_LOG_DEBUG(
"network",
"WORLD: Recv CMSG_BUY_STABLE_SLOT.");
762 SF_LOG_DEBUG(
"network",
"HandleStableRevivePet: Not implemented");
767 SF_LOG_DEBUG(
"network",
"WORLD: Recv CMSG_STABLE_SWAP_PET.");
771 recvData >> npcGUID >> petId;
813 Field* fields = result->Fetch();
825 if (!creatureInfo || !creatureInfo->
IsTameable(
true))
868 guildBank = recvData.
ReadBit();
891 SF_LOG_DEBUG(
"network",
"WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(npcGuid)));
900 float discountMod =
_player->GetReputationPriceDiscount(unit);
908 _player->DurabilityRepair(item->
GetPos(),
true, discountMod, guildBank);
913 _player->DurabilityRepairAll(
true, discountMod, guildBank);
@ CHAR_SEL_PET_SLOT_BY_ID
@ CHAR_SEL_PET_SLOTS_DETAIL
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
#define MAX_SPELL_EFFECTS
#define SF_LOG_DEBUG(filterType__,...)
@ STABLE_ERR_INVALID_SLOT
@ STABLE_SUCCESS_BUY_SLOT
@ STABLE_SUCCESS_UNSTABLE
uint32 GUID_LOPART(uint64 x)
@ PET_SAVE_FIRST_STABLE_SLOT
@ PET_SAVE_LAST_STABLE_SLOT
@ TRAINER_SPELL_GREEN_DISABLED
Skyfire::AutoPtr< PreparedResultSet, Skyfire::Mutex > PreparedQueryResult
std::pair< SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator > SpellsRequiringSpellMapBounds
@ UNIT_NPC_FLAG_INNKEEPER
@ UNIT_NPC_FLAG_SPIRITHEALER
@ AURA_INTERRUPT_FLAG_TALK
void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid)
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
void put(size_t pos, T value)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
size_t bitwpos() const
Returns position of last written bit.
void WriteString(std::string const &str)
void ReadGuidBytes(ObjectGuid &guid, Offsets... offsets)
void PutBits(size_t pos, T value, uint32 bitCount)
void ReadGuidMask(ObjectGuid &guid, Offsets... offsets)
void WriteBits(T value, size_t bits)
CreatureTemplate const * GetCreatureTemplate() const
TrainerSpellData const * GetTrainerSpells() const
std::string GetString() const
PetType getPetType() const
bool LoadPetFromDB(Player *owner, uint32 petentry=0, uint32 petnumber=0, bool current=false)
Creature * GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
void setUInt32(const uint8 index, const uint32 value)
void setUInt8(const uint8 index, const uint8 value)
virtual bool OnGossipHello(Player *player)
uint32 getFaction() const
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
void StopMoving()
-------—End of Pet responses methods-------—
bool IsQuestGiver() const
CharmInfo * GetCharmInfo()
bool IsBMAuctioner() const
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
bool IsServiceProvider() const
void SendPlaySpellVisualKit(uint32 SpellVisualId, uint32 Duration, int32 Type)
bool IsSpiritGuide() const
std::string const & GetName() const
void HandleUnstablePetCallback(PreparedQueryResult result, uint32 petId)
const char * GetSkyFireString(int32 entry) const
PreparedQueryResultFuture _stablePetCallback
void HandleUnstablePet(WorldPacket &recvPacket)
void SendTrainerList(uint64 guid)
void HandleTrainerBuySpellOpcode(WorldPacket &recvPacket)
bool CheckStableMaster(uint64 guid)
void SendStablePet(uint64 guid)
void HandleStableRevivePet(WorldPacket &recvPacket)
void HandleBinderActivateOpcode(WorldPacket &recvPacket)
void HandleStablePet(WorldPacket &recvPacket)
Player * GetPlayer() const
void SendTrainerBuyFailed(ObjectGuid guid, uint32 spellId, uint32 reason)
void SendBindPoint(Creature *npc)
void HandleTrainerListOpcode(WorldPacket &recvPacket)
void SendSpiritResurrect()
void HandleBuyStableSlot(WorldPacket &recvPacket)
void SendTabardVendorActivate(uint64 guid)
void HandleStableSwapPetCallback(PreparedQueryResult result, uint32 petId)
void HandleBankerActivateOpcode(WorldPacket &recvPacket)
QueryCallback< PreparedQueryResult, uint32 > _unstablePetCallback
void HandleGossipHelloOpcode(WorldPacket &recvPacket)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void HandleRepairItemOpcode(WorldPacket &recvPacket)
void HandleRequestStabledPetsOpcode(WorldPacket &recvPacket)
void SendShowBank(ObjectGuid guid)
void HandleSpiritHealerActivateOpcode(WorldPacket &recvPacket)
void SendStableResult(uint8 guid)
QueryCallback< PreparedQueryResult, uint32 > _stableSwapCallback
void SendStablePetCallback(PreparedQueryResult result, uint64 guid)
void HandleStablePetCallback(PreparedQueryResult result)
void HandleStableSwapPet(WorldPacket &recvPacket)
QueryCallback< PreparedQueryResult, uint64 > _sendStabledPetCallback
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
@ SMSG_TABARD_VENDOR_ACTIVATE
@ SMSG_TRAINER_BUY_FAILED
uint32 GetPetNumber() const
bool IsTameable(bool canTameExotic) const
float GetPositionZ() const
float GetPositionX() const
float GetPositionY() const
TrainerSpellMap spellList
TrainerSpell const * Find(uint32 spell_id) const
uint32 learnedSpell[MAX_SPELL_EFFECTS]