[Feature] GM State Change Persistance (#2328)

* [Feature] GM State Change Persistance

- Flymode and Invulnerable will now persist over zoning.

- Appended GMSpeed, Flymode and Invulnerable to the hideme message GMs see when they first login.

- Added #godmode [on/off] command to turn on or off hideme, flymode, gmspeed and invulnerable all in one shot.

- /becomenpc will now disable tells to the target player. It will also automatically disable GM States that interfere with its functionality.

- GM Command /toggle will not properly turn tells on/off

- GMs will now be notified if they are ignoring tells when they first zone-in, provided their GM flag is up.

- Added TellsOff variable to the output to #showstats

* [Bug] Fix tells when gmhideme is turned off.

* [Cleanup] Cleanup function and rename for consistancy.

Remove un-needed this->

* Tweaks

* Tweaks

* Update db_update_manifest.txt

* Move string building logic to a vector and use strings join

* Update client_packet.cpp

* Update 2022_07_28_gm_state_changes.sql

* PR comment tweaks

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Michael
2022-07-30 20:29:24 -04:00
committed by GitHub
parent 793d4bc3a4
commit ea878ed27f
15 changed files with 252 additions and 125 deletions
+11 -10
View File
@@ -220,6 +220,7 @@ Client::Client(EQStreamInterface* ieqs)
LFGComments[0] = '\0';
LFP = false;
gmspeed = 0;
gminvul = false;
playeraction = 0;
SetTarget(0);
auto_attack = false;
@@ -3378,27 +3379,26 @@ void Client::SetTint(int16 in_slot, EQ::textures::Tint_Struct& color) {
}
void Client::SetHideMe(bool flag)
void Client::SetHideMe(bool gm_hide_me)
{
EQApplicationPacket app;
gm_hide_me = flag;
if(gm_hide_me)
{
database.SetHideMe(AccountID(),true);
if (gm_hide_me) {
database.SetHideMe(AccountID(), true);
CreateDespawnPacket(&app, false);
entity_list.RemoveFromTargets(this);
trackable = false;
tellsoff = true;
}
else
{
database.SetHideMe(AccountID(),false);
else {
database.SetHideMe(AccountID(), false);
CreateSpawnPacket(&app);
trackable = true;
tellsoff = false;
}
entity_list.QueueClientsStatus(this, &app, true, 0, Admin()-1);
entity_list.QueueClientsStatus(this, &app, true, 0, Admin() - 1);
UpdateWho();
}
void Client::SetLanguageSkill(int langid, int value)
@@ -7092,6 +7092,7 @@ void Client::SendStatsWindow(Client* client, bool use_window)
client->Message(Chat::White, " compute_tohit: %i TotalToHit: %i", compute_tohit(skill), GetTotalToHit(skill, 0));
client->Message(Chat::White, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense());
client->Message(Chat::White, " offense: %i mitigation ac: %i", offense(skill), GetMitigationAC());
client->Message(Chat::White, " AFK: %i LFG: %i Anon: %i PVP: %i GM: %i Flymode: %i GMSpeed: %i Hideme: %i GMInvul: %d LD: %i ClientVersion: %i TellsOff: %i", AFK, LFG, GetAnon(), GetPVP(), GetGM(), flymode, GetGMSpeed(), GetHideMe(), GetGMInvul(), IsLD(), ClientVersionBit(), tellsoff);
if(CalcMaxMana() > 0)
client->Message(Chat::White, " Mana: %i/%i Mana Regen: %i/%i", GetMana(), GetMaxMana(), CalcManaRegen(), CalcManaRegenCap());
client->Message(Chat::White, " End.: %i/%i End. Regen: %i/%i",GetEndurance(), GetMaxEndurance(), CalcEnduranceRegen(), CalcEnduranceRegenCap());