[Feature] Implemented /shield ability and related affects (#1494)

* shield ability initial work

* updates

* update

* updates

* Update client_process.cpp

* major updates

optimized
pet support
perl support

* updates

* minor update

* fix merge error

* requested changes

* variable fix

* optimization

* minor update

* Revert "optimization"

This reverts commit 27e11e758b.

* fix

reset variables on shield_target if shielder dies or zones during shielding.

* edge case fix

Catch and fix situations where shield target doesn't have shielder variable cleared. Can occur if shielder . uses ability when target is not in combat then zones.

* combined packet and mob function

Shield now uses a common pathway through ShieldAbility, added parameters to perl function

* Addressing formatting for Kayen

* Fix function typo

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
KayenEQ
2021-08-15 23:59:10 -04:00
committed by GitHub
parent 9c62bf3c2f
commit d40d21121a
15 changed files with 363 additions and 191 deletions
-13
View File
@@ -138,7 +138,6 @@ Client::Client(EQStreamInterface* ieqs)
linkdead_timer(RuleI(Zone,ClientLinkdeadMS)),
dead_timer(2000),
global_channel_timer(1000),
shield_timer(500),
fishing_timer(8000),
endupkeep_timer(1000),
forget_timer(0),
@@ -200,7 +199,6 @@ Client::Client(EQStreamInterface* ieqs)
account_id = 0;
admin = 0;
lsaccountid = 0;
shield_target = nullptr;
guild_id = GUILD_NONE;
guildrank = 0;
GuildBanker = false;
@@ -236,7 +234,6 @@ Client::Client(EQStreamInterface* ieqs)
pQueuedSaveWorkID = 0;
position_update_same_count = 0;
fishing_timer.Disable();
shield_timer.Disable();
dead_timer.Disable();
camp_timer.Disable();
autosave_timer.Disable();
@@ -420,16 +417,6 @@ Client::~Client() {
}
}
if (shield_target) {
for (int y = 0; y < 2; y++) {
if (shield_target->shielder[y].shielder_id == GetID()) {
shield_target->shielder[y].shielder_id = 0;
shield_target->shielder[y].shielder_bonus = 0;
}
}
shield_target = nullptr;
}
if(GetTarget())
GetTarget()->IsTargeted(-1);