mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 17:38:26 +00:00
Better flee runspeed calculation.
Added two new NPC special_abilities, ALWAYS_FLEE and FLEE_PERCENT. Fixed an issue where a NPC could get stuck on a single coord in a rectangular roambox. Added mindelay to spawngroup to allow for greater control of the roambox delay. SQL is required.
This commit is contained in:
+15
-1
@@ -216,6 +216,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
||||
roambox_min_y = -2;
|
||||
roambox_movingto_x = -2;
|
||||
roambox_movingto_y = -2;
|
||||
roambox_min_delay = 1000;
|
||||
roambox_delay = 1000;
|
||||
org_heading = heading;
|
||||
p_depop = false;
|
||||
@@ -1526,6 +1527,12 @@ void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool rem
|
||||
case 'i':
|
||||
SetSpecialAbility(IMMUNE_TAUNT, remove ? 0 : 1);
|
||||
break;
|
||||
case 'e':
|
||||
SetSpecialAbility(ALWAYS_FLEE, remove ? 0 : 1);
|
||||
break;
|
||||
case 'h':
|
||||
SetSpecialAbility(FLEE_PERCENT, remove ? 0 : 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -1686,7 +1693,14 @@ bool Mob::HasNPCSpecialAtk(const char* parse) {
|
||||
HasAllAttacks = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
if(!GetSpecialAbility(ALWAYS_FLEE))
|
||||
HasAllAttacks = false;
|
||||
break;
|
||||
case 'h':
|
||||
if(!GetSpecialAbility(FLEE_PERCENT))
|
||||
HasAllAttacks = false;
|
||||
break;
|
||||
default:
|
||||
HasAllAttacks = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user