mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix build warnings
This commit is contained in:
@@ -271,6 +271,8 @@ variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile
|
||||
;
|
||||
|
||||
all.add(win);
|
||||
#else
|
||||
(void)configService;
|
||||
#endif
|
||||
variables_map variablesMap;
|
||||
try
|
||||
|
||||
@@ -1373,7 +1373,7 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const
|
||||
// This set of checks is should be done only for creatures
|
||||
if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters
|
||||
|| (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) && who->GetTypeId() == TYPEID_PLAYER) // immune to PC and target is a player, return false
|
||||
|| (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) // player pets are immune to pc as well
|
||||
|| (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))) // player pets are immune to pc as well
|
||||
return false;
|
||||
|
||||
// Do not attack non-combat pets
|
||||
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
|
||||
// on retail spell casted on a creature's death are not casted after death but keeping mob at 1 health, casting it and then letting the mob die.
|
||||
// this feature should be still implemented
|
||||
void DamageTaken(Unit* attacker, uint32 &damage) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32 &damage) override
|
||||
{
|
||||
int32 actualHp = me->GetHealth();
|
||||
actualHp -= damage;
|
||||
|
||||
Reference in New Issue
Block a user