Core/Misc: Reduce differences between branches
This commit is contained in:
@@ -1700,7 +1700,7 @@ void Item::SendUpdateSockets()
|
||||
{
|
||||
WorldPackets::Item::SocketGemsSuccess socketGems;
|
||||
socketGems.Item = GetGUID();
|
||||
GetOwner()->GetSession()->SendPacket(socketGems.Write());
|
||||
GetOwner()->SendDirectMessage(socketGems.Write());
|
||||
}
|
||||
|
||||
// Though the client has the information in the item's data field,
|
||||
@@ -1715,7 +1715,7 @@ void Item::SendTimeUpdate(Player* owner)
|
||||
WorldPackets::Item::ItemTimeUpdate itemTimeUpdate;
|
||||
itemTimeUpdate.ItemGuid = GetGUID();
|
||||
itemTimeUpdate.DurationLeft = duration;
|
||||
owner->GetSession()->SendPacket(itemTimeUpdate.Write());
|
||||
owner->SendDirectMessage(itemTimeUpdate.Write());
|
||||
}
|
||||
|
||||
Item* Item::CreateItem(uint32 itemEntry, uint32 count, ItemContext context, Player const* player /*= nullptr*/, bool addDefaultBonuses /*= true*/)
|
||||
|
||||
@@ -505,16 +505,9 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
|
||||
LearnDefaultSkills();
|
||||
LearnCustomSpells();
|
||||
|
||||
// Original action bar. Do not use Player::AddActionButton because we do not have skill spells loaded at this time
|
||||
// but checks will still be performed later when loading character from db in Player::_LoadActions
|
||||
// original action bar
|
||||
for (PlayerCreateInfoActions::const_iterator action_itr = info->action.begin(); action_itr != info->action.end(); ++action_itr)
|
||||
{
|
||||
// create new button
|
||||
ActionButton& ab = m_actionButtons[action_itr->button];
|
||||
|
||||
// set data
|
||||
ab.SetActionAndType(action_itr->action, ActionButtonType(action_itr->type));
|
||||
}
|
||||
AddActionButton(action_itr->button, action_itr->action, action_itr->type);
|
||||
|
||||
if (ChrSpecializationEntry const* defaultSpec = sDB2Manager.GetDefaultChrSpecializationForClass(GetClass()))
|
||||
{
|
||||
|
||||
@@ -785,7 +785,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Creature (Entry: {}) has wrong spell '{}' defined in `auras` field in `creature_template_addon`.", entry, std::string(aura));
|
||||
TC_LOG_ERROR("sql.sql", "Creature (Entry: {}) has wrong spell '{}' defined in `auras` field in `creature_template_addon`.", entry, aura);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1225,7 +1225,7 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Creature (GUID: {}) has wrong spell '{}' defined in `auras` field in `creature_addon`.", guid, std::string(aura));
|
||||
TC_LOG_ERROR("sql.sql", "Creature (GUID: {}) has wrong spell '{}' defined in `auras` field in `creature_addon`.", guid, aura);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4722,7 +4722,7 @@ void ObjectMgr::LoadQuests()
|
||||
// additional quest integrity checks (GO, creature_template and items must be loaded already)
|
||||
|
||||
if (qinfo->GetQuestType() >= MAX_DB_ALLOWED_QUEST_TYPES)
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} has `Method` = {}, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestType());
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} has `QuestType` = {}, expected values are 0, 1, 2 or 3.", qinfo->GetQuestId(), qinfo->GetQuestType());
|
||||
|
||||
if (qinfo->_specialFlags & ~QUEST_SPECIAL_FLAGS_DB_ALLOWED)
|
||||
{
|
||||
@@ -5192,13 +5192,13 @@ void ObjectMgr::LoadQuests()
|
||||
usedMailTemplates.emplace(qinfo->_rewardMailTemplateId, qinfo->GetQuestId());
|
||||
}
|
||||
|
||||
if (uint32 nextQuestInChain = qinfo->_nextQuestInChain)
|
||||
if (uint32 rewardNextQuest = qinfo->_rewardNextQuest)
|
||||
{
|
||||
if (!_questTemplates.count(nextQuestInChain))
|
||||
if (!_questTemplates.count(rewardNextQuest))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} has `NextQuestInChain` = {} but quest {} does not exist, quest chain will not work.",
|
||||
qinfo->GetQuestId(), qinfo->_nextQuestInChain, qinfo->_nextQuestInChain);
|
||||
qinfo->_nextQuestInChain = 0;
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} has `RewardNextQuest` = {} but quest {} does not exist, quest chain will not work.",
|
||||
qinfo->GetQuestId(), qinfo->_rewardNextQuest, qinfo->_rewardNextQuest);
|
||||
qinfo->_rewardNextQuest = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ Quest::Quest(QuestTemplateQueryResult const& questRecord) :
|
||||
_questSortID(questRecord.QuestSortID().GetInt16()),
|
||||
_questInfoID(questRecord.QuestInfoID().GetUInt16()),
|
||||
_suggestedPlayers(questRecord.SuggestedGroupNum().GetUInt8()),
|
||||
_nextQuestInChain(questRecord.RewardNextQuest().GetUInt32()),
|
||||
_rewardNextQuest(questRecord.RewardNextQuest().GetUInt32()),
|
||||
_rewardXPDifficulty(questRecord.RewardXPDifficulty().GetUInt32()),
|
||||
_rewardXPMultiplier(questRecord.RewardXPMultiplier().GetFloat()),
|
||||
_rewardMoneyDifficulty(questRecord.RewardMoneyDifficulty().GetUInt32()),
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace WorldPackets::Quest
|
||||
#define QUEST_ITEM_DROP_COUNT 4
|
||||
#define QUEST_REWARD_CHOICES_COUNT 6
|
||||
#define QUEST_REWARD_ITEM_COUNT 4
|
||||
#define QUEST_DEPLINK_COUNT 10
|
||||
#define QUEST_REWARD_REPUTATIONS_COUNT 5
|
||||
#define QUEST_EMOTE_COUNT 4
|
||||
#define QUEST_REWARD_CURRENCY_COUNT 4
|
||||
@@ -652,7 +651,7 @@ class TC_GAME_API Quest
|
||||
uint32 GetNextQuestId() const { return _nextQuestID; }
|
||||
int32 GetExclusiveGroup() const { return _exclusiveGroup; }
|
||||
int32 GetBreadcrumbForQuestId() const { return _breadcrumbForQuestId; }
|
||||
uint32 GetNextQuestInChain() const { return _nextQuestInChain; }
|
||||
uint32 GetNextQuestInChain() const { return _rewardNextQuest; }
|
||||
int32 GetRewArenaPoints() const {return _rewardArenaPoints; }
|
||||
uint32 GetXPDifficulty() const { return _rewardXPDifficulty; }
|
||||
float GetXPMultiplier() const { return _rewardXPMultiplier; }
|
||||
@@ -790,7 +789,7 @@ class TC_GAME_API Quest
|
||||
int32 _questSortID = 0;
|
||||
uint32 _questInfoID = 0;
|
||||
uint32 _suggestedPlayers = 0;
|
||||
uint32 _nextQuestInChain = 0;
|
||||
uint32 _rewardNextQuest = 0;
|
||||
uint32 _rewardXPDifficulty = 0;
|
||||
float _rewardXPMultiplier = 0.f;
|
||||
uint32 _rewardMoneyDifficulty = 0;
|
||||
|
||||
@@ -1133,19 +1133,10 @@ struct npc_scarlet_ghoul : public ScriptedAI
|
||||
std::list<TempSummon*> MinionList;
|
||||
owner->GetAllMinionsByEntry(MinionList, NPC_GHOULS);
|
||||
|
||||
if (!MinionList.empty())
|
||||
{
|
||||
for (Creature* creature : MinionList)
|
||||
{
|
||||
if (creature->GetOwner()->GetGUID() == me->GetOwner()->GetGUID())
|
||||
{
|
||||
if (creature->IsInCombat() && creature->getAttackerForHelper())
|
||||
{
|
||||
AttackStart(creature->getAttackerForHelper());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (TempSummon* summon : MinionList)
|
||||
if (summon->GetOwnerGUID() == me->GetOwnerGUID())
|
||||
if (summon->IsInCombat() && summon->getAttackerForHelper())
|
||||
AttackStart(summon->getAttackerForHelper());
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
|
||||
Reference in New Issue
Block a user