Replaced npcspecialatk with special_attacks, needs more testing also gotta export new api for it as I can't remove the legacy one. Too many quests rely on the legacy functionality.

This commit is contained in:
KimLS
2013-07-06 03:45:06 -07:00
parent 0c675c33e2
commit 63d678ce29
32 changed files with 355 additions and 663 deletions
+3 -3
View File
@@ -979,7 +979,7 @@ void NPC::RangedAttack(Mob* other)
//if we have SPECATK_RANGED_ATK set then we range attack without weapon or ammo
const Item_Struct* weapon = nullptr;
const Item_Struct* ammo = nullptr;
if(!SpecAttacks[SPECATK_RANGED_ATK])
if(!GetSpecialAbility(SPECATK_RANGED_ATK))
{
//find our bow and ammo return if we can't find them...
return;
@@ -1940,7 +1940,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
float level_difference = GetLevel() - who->GetLevel();
//Support for how taunt worked pre 2000 on LIVE - Can not taunt NPC over your level.
if ((RuleB(Combat,TauntOverLevel) == false) && (level_difference < 0) || who->SpecAttacks[IMMUNE_TAUNT]){
if ((RuleB(Combat,TauntOverLevel) == false) && (level_difference < 0) || who->GetSpecialAbility(IMMUNE_TAUNT)){
Message_StringID(MT_SpellFailure,FAILED_TAUNT);
return;
}
@@ -2207,7 +2207,7 @@ bool Mob::CanDoSpecialAttack(Mob *other)
return false;
}
if(other->GetInvul() || other->SpecAttacks[IMMUNE_MELEE])
if(other->GetInvul() || other->GetSpecialAbility(IMMUNE_MELEE))
return false;
return true;