mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
add bot camp timer to prevent /camp exploits
This commit is contained in:
@@ -877,6 +877,7 @@ RULE_INT(Bots, DefaultFollowDistance, 20, "Default 20. Distance a bot will follo
|
||||
RULE_INT(Bots, MaxFollowDistance, 300, "Default 300. Max distance a bot can be set to follow behind.")
|
||||
RULE_INT(Bots, MaxDistanceRanged, 300, "Default 300. Max distance a bot can be set to ranged.")
|
||||
RULE_BOOL(Bots, AllowAIMez, true, "If enabled bots will automatically mez/AE mez eligible targets.")
|
||||
RULE_INT(Bots, CampTimer, 25, "Number of seconds after /camp has begun before bots camp out.")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Chat)
|
||||
|
||||
@@ -148,6 +148,7 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
|
||||
),
|
||||
hpupdate_timer(2000),
|
||||
camp_timer(29000),
|
||||
bot_camp_timer((RuleI(Bots, CampTimer) * 1000)),
|
||||
process_timer(100),
|
||||
consume_food_timer(CONSUMPTION_TIMER),
|
||||
zoneinpacket_timer(1000),
|
||||
@@ -252,6 +253,7 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
|
||||
fishing_timer.Disable();
|
||||
dead_timer.Disable();
|
||||
camp_timer.Disable();
|
||||
bot_camp_timer.Disable();
|
||||
autosave_timer.Disable();
|
||||
GetMercTimer()->Disable();
|
||||
instalog = false;
|
||||
|
||||
@@ -2036,6 +2036,7 @@ private:
|
||||
PTimerList p_timers; //persistent timers
|
||||
Timer hpupdate_timer;
|
||||
Timer camp_timer;
|
||||
Timer bot_camp_timer;
|
||||
Timer process_timer;
|
||||
Timer consume_food_timer;
|
||||
Timer zoneinpacket_timer;
|
||||
|
||||
@@ -4285,6 +4285,7 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
camp_timer.Start(29000, true);
|
||||
bot_camp_timer.Start((RuleI(Bots, CampTimer) * 1000), true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14680,6 +14681,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
SetFeigned(false);
|
||||
BindWound(this, false, true);
|
||||
camp_timer.Disable();
|
||||
bot_camp_timer.Disable();
|
||||
}
|
||||
else if (sa->parameter == Animation::Sitting) {
|
||||
SetAppearance(eaSitting);
|
||||
|
||||
@@ -193,6 +193,10 @@ bool Client::Process() {
|
||||
return false; //delete client
|
||||
}
|
||||
|
||||
if (bot_camp_timer.Check()) {
|
||||
Bot::BotOrderCampAll(this);
|
||||
}
|
||||
|
||||
if (camp_timer.Check()) {
|
||||
Raid *myraid = entity_list.GetRaidByClient(this);
|
||||
if (myraid) {
|
||||
|
||||
Reference in New Issue
Block a user