mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 07:16:37 +00:00
Merge pull request #1239 from noudess/sneak-pull
[Game Play Mechanic] Very simple implementation of Sneak Pull
This commit is contained in:
+14
-1
@@ -3239,6 +3239,19 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
|
||||
}
|
||||
|
||||
float assist_range = (mob->GetAssistRange() * mob->GetAssistRange());
|
||||
|
||||
// Implement optional sneak-pull
|
||||
if (RuleB(Combat, EnableSneakPull) && attacker->sneaking) {
|
||||
assist_range = RuleI(Combat, SneakPullAssistRange);
|
||||
if (attacker->IsClient()) {
|
||||
float clientx = attacker->GetX();
|
||||
float clienty = attacker->GetY();
|
||||
if (attacker->CastToClient()->BehindMob(mob, clientx, clienty)) {
|
||||
assist_range = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (distance > assist_range) {
|
||||
continue;
|
||||
}
|
||||
@@ -3336,4 +3349,4 @@ void NPC::ScaleNPC(uint8 npc_level) {
|
||||
}
|
||||
npc_scale_manager->ResetNPCScaling(this);
|
||||
npc_scale_manager->ScaleNPC(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user