mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
importing changes from callmephil repo
a special thanks to him
This commit is contained in:
@@ -4204,7 +4204,7 @@ void Player::removeSpell(uint32 spellId, uint8 removeSpecMask, bool onlyTemporar
|
||||
// not reset skills for professions and racial abilities
|
||||
if ((pSkill->categoryId == SKILL_CATEGORY_SECONDARY || pSkill->categoryId == SKILL_CATEGORY_PROFESSION) && (IsProfessionSkill(pSkill->id) || _spell_idx->second->racemask != 0))
|
||||
continue;
|
||||
|
||||
|
||||
// pussywizard: this is needed for weapon/armor/language skills to remove them when loosing spell
|
||||
SetSkill(pSkill->id, GetSkillStep(pSkill->id), 0, 0);
|
||||
}
|
||||
@@ -14584,8 +14584,8 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
|
||||
break;
|
||||
case GOSSIP_OPTION_VENDOR:
|
||||
{
|
||||
VendorItemData const* vendorItems = creature->GetVendorItems();
|
||||
if (!vendorItems || vendorItems->Empty())
|
||||
VendorItemData const* vendorItems = itr->second.ActionMenuId ? nullptr : creature->GetVendorItems();
|
||||
if (!itr->second.ActionMenuId && (!vendorItems || vendorItems->Empty()))
|
||||
{
|
||||
sLog->outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", creature->GetGUIDLow(), creature->GetEntry());
|
||||
canTalk = false;
|
||||
@@ -14759,7 +14759,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
break;
|
||||
case GOSSIP_OPTION_VENDOR:
|
||||
case GOSSIP_OPTION_ARMORER:
|
||||
GetSession()->SendListInventory(guid);
|
||||
GetSession()->SendListInventory(guid, menuItemData->GossipActionMenuId);
|
||||
break;
|
||||
case GOSSIP_OPTION_STABLEPET:
|
||||
GetSession()->SendStablePet(guid);
|
||||
@@ -20407,7 +20407,7 @@ void Player::TextEmote(const std::string& text)
|
||||
{
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_EMOTE, LANG_UNIVERSAL, this, this, text);
|
||||
SendMessageToSetInRange_OwnTeam(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), true);
|
||||
SendMessageToSetInRange(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), true, !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT));
|
||||
}
|
||||
|
||||
void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
|
||||
@@ -20514,7 +20514,7 @@ void Player::PossessSpellInitialize()
|
||||
|
||||
if (!charmInfo)
|
||||
{
|
||||
sLog->outError("Player::PossessSpellInitialize(): charm (" UI64FMTD") has no charminfo!", charm->GetGUID());
|
||||
sLog->outError("Player::PossessSpellInitialize(): charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20604,7 +20604,7 @@ void Player::CharmSpellInitialize()
|
||||
CharmInfo* charmInfo = charm->GetCharmInfo();
|
||||
if (!charmInfo)
|
||||
{
|
||||
sLog->outError("Player::CharmSpellInitialize(): the player's charm (" UI64FMTD") has no charminfo!", charm->GetGUID());
|
||||
sLog->outError("Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21533,8 +21533,9 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
||||
return false;
|
||||
}
|
||||
|
||||
VendorItemData const* vItems = creature->GetVendorItems();
|
||||
if (!vItems || vItems->Empty())
|
||||
|
||||
VendorItemData const* vItems = GetSession()->GetCurrentVendor() ? sObjectMgr->GetNpcVendorItemList(GetSession()->GetCurrentVendor()) : creature->GetVendorItems();
|
||||
if (!vItems || vItems->Empty())
|
||||
{
|
||||
SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, item, 0);
|
||||
return false;
|
||||
@@ -25555,7 +25556,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
|
||||
|
||||
if (!found) // something wrong...
|
||||
{
|
||||
sLog->outError("Player %s tried to save equipment set " UI64FMTD" (index %u), but that equipment set not found!", GetName().c_str(), eqset.Guid, index);
|
||||
sLog->outError("Player %s tried to save equipment set "UI64FMTD" (index %u), but that equipment set not found!", GetName().c_str(), eqset.Guid, index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user