mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-21 10:11:30 +00:00
[Bug Fix] Pick Lock was allowing skillups on doors above player skill (#1815)
* [Bux Fix] Pick Lock was allowing skillups on doors above player skill * Fixed indentation * Fix indentation #2 - I am not so bright :( * Further refine messages for pick lock to match live * sql to make pot pick locks book pickable by skill 1 and skillup
This commit is contained in:
parent
6a77764f8b
commit
8c78a19c95
@ -0,0 +1 @@
|
|||||||
|
UPDATE doors SET lockpick=1 WHERE doorid=46 AND zone="potranquility";
|
||||||
@ -154,6 +154,7 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
TaskPeriodic_Timer(RuleI(TaskSystem, PeriodicCheckTimer) * 1000),
|
TaskPeriodic_Timer(RuleI(TaskSystem, PeriodicCheckTimer) * 1000),
|
||||||
charm_update_timer(6000),
|
charm_update_timer(6000),
|
||||||
rest_timer(1),
|
rest_timer(1),
|
||||||
|
pick_lock_timer(1000),
|
||||||
charm_class_attacks_timer(3000),
|
charm_class_attacks_timer(3000),
|
||||||
charm_cast_timer(3500),
|
charm_cast_timer(3500),
|
||||||
qglobal_purge_timer(30000),
|
qglobal_purge_timer(30000),
|
||||||
|
|||||||
@ -1528,6 +1528,7 @@ public:
|
|||||||
void UpdateMercLevel();
|
void UpdateMercLevel();
|
||||||
void CheckMercSuspendTimer();
|
void CheckMercSuspendTimer();
|
||||||
Timer* GetMercTimer() { return &merc_timer; };
|
Timer* GetMercTimer() { return &merc_timer; };
|
||||||
|
Timer* GetPickLockTimer() { return &pick_lock_timer; };
|
||||||
|
|
||||||
const char* GetRacePlural(Client* client);
|
const char* GetRacePlural(Client* client);
|
||||||
const char* GetClassPlural(Client* client);
|
const char* GetClassPlural(Client* client);
|
||||||
@ -1869,6 +1870,7 @@ private:
|
|||||||
Timer consent_throttle_timer;
|
Timer consent_throttle_timer;
|
||||||
Timer dynamiczone_removal_timer;
|
Timer dynamiczone_removal_timer;
|
||||||
Timer task_request_timer;
|
Timer task_request_timer;
|
||||||
|
Timer pick_lock_timer;
|
||||||
|
|
||||||
Timer heroforge_wearchange_timer;
|
Timer heroforge_wearchange_timer;
|
||||||
|
|
||||||
|
|||||||
@ -288,8 +288,11 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Key required
|
* Key required
|
||||||
|
* If using a lock_pick_item leave messaging to that code below
|
||||||
*/
|
*/
|
||||||
|
if (lock_pick_item == nullptr && !IsDoorOpen()) {
|
||||||
sender->Message(Chat::LightBlue, "This is locked...");
|
sender->Message(Chat::LightBlue, "This is locked...");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GM can always open locks
|
* GM can always open locks
|
||||||
@ -335,19 +338,30 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
|||||||
*/
|
*/
|
||||||
else if (lock_pick_item != nullptr) {
|
else if (lock_pick_item != nullptr) {
|
||||||
if (sender->GetSkill(EQ::skills::SkillPickLock)) {
|
if (sender->GetSkill(EQ::skills::SkillPickLock)) {
|
||||||
|
Timer* pick_lock_timer = sender->GetPickLockTimer();
|
||||||
if (lock_pick_item->GetItem()->ItemType == EQ::item::ItemTypeLockPick) {
|
if (lock_pick_item->GetItem()->ItemType == EQ::item::ItemTypeLockPick) {
|
||||||
|
if (!pick_lock_timer->Check()) {
|
||||||
|
// Stop full scale mad spamming
|
||||||
|
safe_delete(outapp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
float player_pick_lock_skill = sender->GetSkill(EQ::skills::SkillPickLock);
|
float player_pick_lock_skill = sender->GetSkill(EQ::skills::SkillPickLock);
|
||||||
sender->CheckIncreaseSkill(EQ::skills::SkillPickLock, nullptr, 1);
|
|
||||||
|
|
||||||
LogSkills("Client has lockpicks: skill=[{}]", player_pick_lock_skill);
|
LogSkills("Client has lockpicks: skill=[{}]", player_pick_lock_skill);
|
||||||
|
|
||||||
if (GetLockpick() <= player_pick_lock_skill) {
|
if (GetLockpick() <= player_pick_lock_skill) {
|
||||||
|
|
||||||
|
// Stop full scale spamming
|
||||||
|
pick_lock_timer->Start(1000, true);
|
||||||
|
|
||||||
if (!IsDoorOpen()) {
|
if (!IsDoorOpen()) {
|
||||||
|
sender->CheckIncreaseSkill(EQ::skills::SkillPickLock, nullptr, 1);
|
||||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
|
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
|
||||||
|
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
||||||
} else {
|
} else {
|
||||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
||||||
}
|
}
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
|
||||||
} else {
|
} else {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user