Core/Misc: Fix build warnings

This commit is contained in:
jackpoz
2015-07-01 20:57:20 +02:00
parent 2263cb9e10
commit 55681666b3
3 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;