mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-04 14:22:24 +00:00
Merge pull request #1239 from noudess/sneak-pull
[Game Play Mechanic] Very simple implementation of Sneak Pull
This commit is contained in:
commit
1bc9e8aff2
@ -501,6 +501,8 @@ RULE_INT(Combat, LevelToStopACTwinkControl, 50, "Level to stop armorclass twink
|
|||||||
RULE_BOOL(Combat, ClassicNPCBackstab, false, "True disables NPC facestab - NPC get normal attack if not behind")
|
RULE_BOOL(Combat, ClassicNPCBackstab, false, "True disables NPC facestab - NPC get normal attack if not behind")
|
||||||
RULE_BOOL(Combat, UseNPCDamageClassLevelMods, true, "Uses GetClassLevelDamageMod calc in npc_scale_manager")
|
RULE_BOOL(Combat, UseNPCDamageClassLevelMods, true, "Uses GetClassLevelDamageMod calc in npc_scale_manager")
|
||||||
RULE_BOOL(Combat, UseExtendedPoisonProcs, false, "Allow old school poisons to last until characrer zones, at a lower proc rate")
|
RULE_BOOL(Combat, UseExtendedPoisonProcs, false, "Allow old school poisons to last until characrer zones, at a lower proc rate")
|
||||||
|
RULE_BOOL(Combat, EnableSneakPull, false, "Enable implementation of Sneak Pull")
|
||||||
|
RULE_INT(Combat, SneakPullAssistRange, 400, "Modified range of assist for sneak pull")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(NPC)
|
RULE_CATEGORY(NPC)
|
||||||
|
|||||||
13
zone/npc.cpp
13
zone/npc.cpp
@ -3239,6 +3239,19 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
|
|||||||
}
|
}
|
||||||
|
|
||||||
float assist_range = (mob->GetAssistRange() * mob->GetAssistRange());
|
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) {
|
if (distance > assist_range) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user