mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 22:56:24 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -620,7 +620,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == nullptr)
|
||||
if (!updateQueue[qp])
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
@@ -688,7 +688,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] == nullptr)
|
||||
if (!updateQueue[qp])
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
|
||||
error = true;
|
||||
@@ -737,7 +737,7 @@ public:
|
||||
|
||||
Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
|
||||
|
||||
if (test == nullptr)
|
||||
if (!test)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for {} are incorrect, the player doesn't have any item at that position!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString()));
|
||||
error = true;
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
{
|
||||
if (Guardians[room][i] == nullptr)
|
||||
if (!Guardians[room][i])
|
||||
{
|
||||
Guardians[room][i] = cr;
|
||||
break;
|
||||
|
||||
@@ -2719,6 +2719,22 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// 71201 - Battle Experience - proc should never happen, handled in script
|
||||
class spell_igb_battle_experience_check : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_igb_battle_experience_check);
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_igb_battle_experience_check::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_icecrown_gunship_battle()
|
||||
{
|
||||
new npc_gunship();
|
||||
@@ -2750,4 +2766,5 @@ void AddSC_boss_icecrown_gunship_battle()
|
||||
new spell_igb_below_zero();
|
||||
new spell_igb_on_gunship_deck();
|
||||
new achievement_im_on_a_boat();
|
||||
RegisterSpellScript(spell_igb_battle_experience_check);
|
||||
}
|
||||
|
||||
@@ -560,37 +560,32 @@ public:
|
||||
switch (CreatureID)
|
||||
{
|
||||
case ADYEN_THE_LIGHTBRINGER:
|
||||
adyen = nullptr;
|
||||
adyen = me->FindNearestCreature(ADYEN_THE_LIGHTBRINGER, 100.0f, true);
|
||||
if (adyen != nullptr)
|
||||
if (adyen)
|
||||
return true;
|
||||
break;
|
||||
case EXARCH_ORELIS:
|
||||
orelis = nullptr;
|
||||
orelis = me->FindNearestCreature(EXARCH_ORELIS, 100.0f, true);
|
||||
if (orelis != nullptr)
|
||||
if (orelis)
|
||||
return true;
|
||||
break;
|
||||
case ANCHORITE_KARJA:
|
||||
karja = nullptr;
|
||||
karja = me->FindNearestCreature(ANCHORITE_KARJA, 100.0f, true);
|
||||
if (karja != nullptr)
|
||||
if (karja)
|
||||
return true;
|
||||
break;
|
||||
case KAYLAAN_THE_LOST:
|
||||
kaylaan = nullptr;
|
||||
kaylaan = me->FindNearestCreature(KAYLAAN_THE_LOST, 100.0f, true);
|
||||
if (kaylaan != nullptr)
|
||||
if (kaylaan)
|
||||
return true;
|
||||
break;
|
||||
case ISHANAH_HIGH_PRIESTESS:
|
||||
ishanah = nullptr;
|
||||
ishanah = me->FindNearestCreature(ISHANAH_HIGH_PRIESTESS, 100.0f, true);
|
||||
if (ishanah == nullptr)
|
||||
if (!ishanah)
|
||||
{
|
||||
// Ishanah may be dead; in this case we also need a reference to the creature for the respawn
|
||||
ishanah = me->FindNearestCreature(ISHANAH_HIGH_PRIESTESS, 100.0f, false);
|
||||
if (ishanah != nullptr)
|
||||
if (ishanah)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -604,10 +599,6 @@ public:
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFaction(FACTION_DEMON);
|
||||
adyen = nullptr;
|
||||
orelis = nullptr;
|
||||
karja = nullptr;
|
||||
ishanah = nullptr;
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
@@ -1185,7 +1176,7 @@ public:
|
||||
for (GuidList::iterator itr = summons.begin(); itr != summons.end(); ++itr, i += 1.0f)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, *itr))
|
||||
{
|
||||
if (who == nullptr)
|
||||
if (!who)
|
||||
{
|
||||
cr->GetMotionMaster()->Clear(false);
|
||||
cr->GetMotionMaster()->MoveFollow(me, 2.0f, M_PI / 2.0f + (i / summons.size() * M_PI));
|
||||
|
||||
Reference in New Issue
Block a user