diff --git a/src/server/game/AI/NpcBots/bot_crypt_lord_ai.cpp b/src/server/game/AI/NpcBots/bot_crypt_lord_ai.cpp index ccfc9c591..9c51dd6a6 100644 --- a/src/server/game/AI/NpcBots/bot_crypt_lord_ai.cpp +++ b/src/server/game/AI/NpcBots/bot_crypt_lord_ai.cpp @@ -105,19 +105,19 @@ public: return new crypt_lord_botAI(creature); } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) override { return creature->GetBotAI()->OnGossipHello(player, 0); } - bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) + bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override { if (bot_ai* ai = creature->GetBotAI()) return ai->OnGossipSelect(player, creature, sender, action); return true; } - bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code) + bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code) override { if (bot_ai* ai = creature->GetBotAI()) return ai->OnGossipSelectCode(player, creature, sender, action, code); diff --git a/src/server/game/AI/NpcBots/botdatamgr.cpp b/src/server/game/AI/NpcBots/botdatamgr.cpp index 1cc7f45e8..c0c509b8a 100644 --- a/src/server/game/AI/NpcBots/botdatamgr.cpp +++ b/src/server/game/AI/NpcBots/botdatamgr.cpp @@ -1169,7 +1169,7 @@ void BotDataMgr::LoadWanderMap(bool reload) const uint8 TEAMS_COUNT = TEAM_NEUTRAL + 1; char const* const team_strs[TEAMS_COUNT] = { "Alliance", "Horde", "Neutral" }; - std::array spawn_node_levels[TEAMS_COUNT]{false}; + std::array spawn_node_levels[TEAMS_COUNT]{ { false } }; uint8 min_spawn_level = DEFAULT_MAX_LEVEL; uint8 max_spawn_level = 0; for (WanderNode const* wp : all_spawn_nodes) diff --git a/src/server/game/AI/NpcBots/botdatamgr.h b/src/server/game/AI/NpcBots/botdatamgr.h index 01e42ee60..f41a1fe1b 100644 --- a/src/server/game/AI/NpcBots/botdatamgr.h +++ b/src/server/game/AI/NpcBots/botdatamgr.h @@ -3,6 +3,7 @@ #include "botcommon.h" #include "DatabaseEnvFwd.h" +#include "DBCEnums.h" #include #include diff --git a/src/server/game/AI/NpcBots/bpet_ai.cpp b/src/server/game/AI/NpcBots/bpet_ai.cpp index bb23e321b..76c5d8f88 100644 --- a/src/server/game/AI/NpcBots/bpet_ai.cpp +++ b/src/server/game/AI/NpcBots/bpet_ai.cpp @@ -1818,7 +1818,7 @@ void bot_pet_ai::RegeneratePetFocus() if (curValue == maxValue || regenTimer >= REGEN_CD) me->SetPower(POWER_FOCUS, curValue); else - me->UpdateUInt32Value(UNIT_FIELD_POWER1 + POWER_FOCUS, curValue); + me->UpdateUInt32Value(UNIT_FIELD_POWER1 + uint16(POWER_FOCUS), curValue); } } @@ -1851,7 +1851,7 @@ void bot_pet_ai::RegeneratePetEnergy() if (curValue == maxValue || regenTimer >= REGEN_CD) me->SetPower(POWER_ENERGY, curValue); else - me->UpdateUInt32Value(UNIT_FIELD_POWER1 + POWER_ENERGY, curValue); + me->UpdateUInt32Value(UNIT_FIELD_POWER1 + uint16(POWER_ENERGY), curValue); } } ////////// diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 3b796b0de..22f9395a0 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1163,9 +1163,6 @@ void Battleground::RemoveBotAtLeave(ObjectGuid guid) RemoveBotFromResurrectQueue(guid); - // GetStatus might be changed in RemovePlayer - define it here - BattlegroundStatus status = GetStatus(); - // BG subclass specific code RemoveBot(guid); diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index a133d2906..a63b10cf9 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -302,7 +302,6 @@ GroupQueueInfo* BattlegroundQueue::AddBotAsGroup(ObjectGuid guid, TeamId teamId, uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32)80); uint32 qHorde = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_HORDE); uint32 qAlliance = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_ALLIANCE); - uint32 qTotal = qHorde + qAlliance; sWorld->SendWorldTextOptional(LANG_BG_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_BG_QUEUE, bgName.c_str(), q_min_level, q_max_level, qAlliance + qHorde, MaxPlayers); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b598b92b4..2021871c5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3857,12 +3857,14 @@ float Unit::GetUnitParryChance() const if (ToCreature()->isWorldBoss()) chance = 13.4f; // + 0.6 by skill diff else if (GetCreatureType() == CREATURE_TYPE_HUMANOID) + { //npcbot - custom parry chance instead of bunch of auras if (IsNPCBot()) chance = ToCreature()->GetCreatureParryChance(); else //end npcbot chance = 5.0f; + } // Xinef: if aura is present, type should not matter chance += GetTotalAuraModifier(SPELL_AURA_MOD_PARRY_PERCENT); @@ -20923,7 +20925,7 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const return 8571; } } - else if (Player::TeamIdForRace(GetRace()) == ALLIANCE) + else if (Player::TeamIdForRace(GetRace()) == TEAM_ALLIANCE) return 892; else return 8571; @@ -21002,16 +21004,16 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const return 2289; } } - else if (Player::TeamIdForRace(GetRace()) == ALLIANCE) + else if (Player::TeamIdForRace(GetRace()) == TEAM_ALLIANCE) return 2281; else return 2289; case FORM_FLIGHT: - if (Player::TeamIdForRace(GetRace()) == ALLIANCE) + if (Player::TeamIdForRace(GetRace()) == TEAM_ALLIANCE) return 20857; return 20872; case FORM_FLIGHT_EPIC: - if (Player::TeamIdForRace(GetRace()) == ALLIANCE) + if (Player::TeamIdForRace(GetRace()) == TEAM_ALLIANCE) return 21243; return 21244; default: