Skip to content

Commit

Permalink
NPCBots: Fix build 1
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed Dec 22, 2023
1 parent 6c1c0c2 commit 44f6f80
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/server/game/AI/NpcBots/bot_GridNotifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ class NearbyObjectBySkillCheck
}
else if (Creature const* cre = ob->ToCreature())
{
if (cre->IsVisible() && cre->getDeathState() == CORPSE && cre->HasUnitFlag(UNIT_FLAG_SKINNABLE) && cre->loot.isLooted() &&
if (cre->IsVisible() && cre->getDeathState() == DeathState::Corpse && cre->HasUnitFlag(UNIT_FLAG_SKINNABLE) && cre->loot.isLooted() &&
cre->isTappedBy(_checker->ToPlayer()) && CheckSkill(cre->GetCreatureTemplate()->GetRequiredLootSkill()))
{
if (int32(cre->GetLevel() < 20 ? (cre->GetLevel() - 10) * 10 : cre->GetLevel() * 5) <= int32(MaxSkillForLevel(_checker->ToUnit()->GetLevel())))
Expand Down Expand Up @@ -1259,7 +1259,7 @@ class NearbyLootableCreatureCheck
{
if (Creature const* cre = unit->ToCreature())
if (_checker->IsWithinDistInMap(cre, _range))
return cre->IsVisible() && cre->getDeathState() == CORPSE &&
return cre->IsVisible() && cre->getDeathState() == DeathState::Corpse &&
cre->HasDynamicFlag(UNIT_DYNFLAG_LOOTABLE) &&
_checker->ToPlayer()->isAllowedToLoot(cre);
return false;
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/AI/NpcBots/bot_ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ class TeleportFinishEvent;
class AwaitStateRemovalEvent;

enum CombatRating : uint8;
enum EnchantmentSlot : uint16;
enum EnchantmentSlot : uint8;
enum GossipOptionIcon : uint8;
enum MeleeHitOutcome : uint8;
enum WeaponAttackType : uint8;

struct CleanDamage;
struct CalcDamageInfo;
Expand Down
4 changes: 2 additions & 2 deletions src/server/game/AI/NpcBots/botmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ void BotMgr::_reviveBot(Creature* bot, WorldLocation* dest)
bot->ResetPlayerDamageReq();
bot->SetPvP(bot->GetBotOwner()->IsPvP());
bot->Motion_Initialize();
bot->setDeathState(ALIVE);
bot->setDeathState(DeathState::Alive);
//bot->GetBotAI()->Reset();
bot->GetBotAI()->SetShouldUpdateStats();

Expand Down Expand Up @@ -1937,7 +1937,7 @@ void BotMgr::KillBot(Creature* bot)

if (bot->IsInWorld() && bot->IsAlive())
{
bot->setDeathState(JUST_DIED);
bot->setDeathState(DeathState::JustDied);
bot->GetBotAI()->JustDied(bot);
//bot->Kill(bot);
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bpet_archmage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class archmage_pet_bot : public CreatureScript
if ((liveTimer += diff) >= uint32(IAmFree() ? (1 * HOUR * IN_MILLISECONDS) : ELEMENTAL_DURATION))
{
canUpdate = false;
me->setDeathState(JUST_DIED);
me->setDeathState(DeathState::JustDied);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bpet_dark_ranger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class dark_ranger_pet_bot : public CreatureScript
if ((liveTimer += diff) >= MINION_DURATION)
{
canUpdate = false;
me->setDeathState(JUST_DIED);
me->setDeathState(DeathState::JustDied);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bpet_dreadlord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class dreadlord_pet_bot : public CreatureScript
if ((liveTimer += diff) >= INFERNAL_DURATION)
{
canUpdate = false;
me->setDeathState(JUST_DIED);
me->setDeathState(DeathState::JustDied);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bpet_necromancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class necromancer_pet_bot : public CreatureScript
if ((liveTimer += diff) >= MINION_DURATION * (IAmFree() ? 5u : 1u))
{
canUpdate = false;
me->setDeathState(JUST_DIED);
me->setDeathState(DeathState::JustDied);
return;
}

Expand Down

0 comments on commit 44f6f80

Please sign in to comment.