[Hotfix] "GM flag" vs "GM Flag"

This commit is contained in:
Akkadius 2024-05-04 18:44:19 -05:00
parent 7ad97ce168
commit 405d963005
16 changed files with 33 additions and 33 deletions

View File

@ -43,7 +43,7 @@
#define ServerOP_OnlineGuildMembersResponse 0x0016 #define ServerOP_OnlineGuildMembersResponse 0x0016
#define ServerOP_LFGuildUpdate 0x0017 #define ServerOP_LFGuildUpdate 0x0017
#define ServerOP_FlagUpdate 0x0018 // GM Flag updated for character, refresh the memory cache #define ServerOP_FlagUpdate 0x0018 // GM flag updated for character, refresh the memory cache
#define ServerOP_GMGoto 0x0019 #define ServerOP_GMGoto 0x0019
#define ServerOP_MultiLineMsg 0x001A #define ServerOP_MultiLineMsg 0x001A
#define ServerOP_Lock 0x001B // For #lock/#unlock inside server #define ServerOP_Lock 0x001B // For #lock/#unlock inside server

View File

@ -1356,7 +1356,7 @@ bool SharedTaskManager::CanRequestSharedTask(uint32_t task_id, const SharedTaskR
} }
if (is_gm) { if (is_gm) {
client_list.SendCharacterMessage(requester->CharID(), Chat::White, "Your GM Flag allows you to bypass shared task minimum player requirements."); client_list.SendCharacterMessage(requester->CharID(), Chat::White, "Your GM flag allows you to bypass shared task minimum player requirements.");
} }
// check if party member count is above the maximum // check if party member count is above the maximum

View File

@ -543,7 +543,7 @@ void Client::CompleteConnect()
LoadZoneFlags(); LoadZoneFlags();
LoadAccountFlags(); LoadAccountFlags();
/* Sets GM Flag if needed & Sends Petition Queue */ /* Sets GM flag if needed & Sends Petition Queue */
UpdateAdmin(false); UpdateAdmin(false);
// Task Packets // Task Packets
@ -717,7 +717,7 @@ void Client::CompleteConnect()
break; break;
} }
Message(Chat::White, "Your GM Flag allows you to levitate in this zone."); Message(Chat::White, "Your GM flag allows you to levitate in this zone.");
} }
SendAppearancePacket( SendAppearancePacket(
@ -2141,7 +2141,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app)
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag prevents {} from being added to discovered items.", "Your GM flag prevents {} from being added to discovered items.",
item_link item_link
).c_str() ).c_str()
); );
@ -2707,7 +2707,7 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app)
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag prevents {} from being added to discovered items.", "Your GM flag prevents {} from being added to discovered items.",
item_link item_link
).c_str() ).c_str()
); );
@ -14251,7 +14251,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag prevents {} from being added to discovered items.", "Your GM flag prevents {} from being added to discovered items.",
item_link item_link
).c_str() ).c_str()
); );

View File

@ -1919,7 +1919,7 @@ void Client::DoStaminaHungerUpdate()
sta->food = 6000; sta->food = 6000;
sta->water = 6000; sta->water = 6000;
Message(Chat::White, "Your GM Flag prevents you from consuming food or water."); Message(Chat::White, "Your GM flag prevents you from consuming food or water.");
} }
} else { // No auto food/drink consumption in the Bazaar } else { // No auto food/drink consumption in the Bazaar
sta->food = 6000; sta->food = 6000;

View File

@ -1162,7 +1162,7 @@ void Corpse::MakeLootRequestPackets(Client *c, const EQApplicationPacket *app)
c->Message(Chat::White, "Your GM Status allows you to loot any items on this corpse."); c->Message(Chat::White, "Your GM Status allows you to loot any items on this corpse.");
} else { } else {
m_loot_request_type = LootRequestType::GMPeek; m_loot_request_type = LootRequestType::GMPeek;
c->Message(Chat::White, "Your GM Flag allows you to look at the items on this corpse."); c->Message(Chat::White, "Your GM flag allows you to look at the items on this corpse.");
} }
} }
else { else {
@ -1624,7 +1624,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
c->Message( c->Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag prevents {} from being added to discovered items.", "Your GM flag prevents {} from being added to discovered items.",
item_link item_link
).c_str() ).c_str()
); );
@ -2301,7 +2301,7 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
return; return;
} }
caster->Message(Chat::White, "Your GM Flag allows you to resurrect this corpse."); caster->Message(Chat::White, "Your GM flag allows you to resurrect this corpse.");
} }
} }
@ -2314,7 +2314,7 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
m_rezzed_experience = m_gm_rezzed_experience; m_rezzed_experience = m_gm_rezzed_experience;
m_gm_rezzed_experience = 0; m_gm_rezzed_experience = 0;
c->Message(Chat::White, "Your GM Flag allows you to resurrect this corpse and return experience."); c->Message(Chat::White, "Your GM flag allows you to resurrect this corpse and return experience.");
} }
} }
} }

View File

@ -295,7 +295,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
); );
sender->MessageString(Chat::LightBlue, DOORS_LOCKED); sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
} else { } else {
sender->Message(Chat::White, "Your GM Flag allows you to use this door."); sender->Message(Chat::White, "Your GM flag allows you to use this door.");
} }
} }
} }
@ -344,7 +344,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
sender->Message( sender->Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag allows you to use this door{}.", "Your GM flag allows you to use this door{}.",
( (
has_guild_name ? has_guild_name ?
fmt::format( fmt::format(
@ -544,7 +544,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
if (sender->GetGM() && has_key_required) { if (sender->GetGM() && has_key_required) {
has_key_required = false; has_key_required = false;
sender->Message(Chat::White, "Your GM Flag allows you to open this door without a key."); sender->Message(Chat::White, "Your GM flag allows you to open this door without a key.");
} }
if (IsDestinationZoneSame() && (!required_key_item)) { if (IsDestinationZoneSame() && (!required_key_item)) {

View File

@ -1655,7 +1655,7 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap
Send = clear_target_window; Send = clear_target_window;
if (c->GetGM() || RuleB(Spells, AlwaysSendTargetsBuffs)) { if (c->GetGM() || RuleB(Spells, AlwaysSendTargetsBuffs)) {
if (c->GetGM()) { if (c->GetGM()) {
c->Message(Chat::White, "Your GM Flag allows you to always see your targets' buffs."); c->Message(Chat::White, "Your GM flag allows you to always see your targets' buffs.");
} }
Send = !clear_target_window; Send = !clear_target_window;

View File

@ -650,7 +650,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
sender->Message( sender->Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag prevents {} from being added to discovered items.", "Your GM flag prevents {} from being added to discovered items.",
item_link item_link
).c_str() ).c_str()
); );

View File

@ -2977,7 +2977,7 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
initiator->Message(Chat::White, message.c_str()); initiator->Message(Chat::White, message.c_str());
return false; return false;
} else { } else {
initiator->Message(Chat::White, "Your GM Flag allows you to bypass bot spawn limits."); initiator->Message(Chat::White, "Your GM flag allows you to bypass bot spawn limits.");
} }
} }
@ -3003,7 +3003,7 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
initiator->Message(Chat::White, message.c_str()); initiator->Message(Chat::White, message.c_str());
return false; return false;
} else { } else {
initiator->Message(Chat::White, "Your GM Flag allows you to bypass bot class-based spawn limits."); initiator->Message(Chat::White, "Your GM flag allows you to bypass bot class-based spawn limits.");
} }
} }

View File

@ -947,7 +947,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (IsClient()) { if (IsClient()) {
if (CastToClient()->GetGM() || RuleB(Character, BindAnywhere)) { if (CastToClient()->GetGM() || RuleB(Character, BindAnywhere)) {
if (CastToClient()->GetGM()) { if (CastToClient()->GetGM()) {
Message(Chat::White, "Your GM Flag allows you to bind anywhere."); Message(Chat::White, "Your GM flag allows you to bind anywhere.");
} }
auto action_packet = auto action_packet =

View File

@ -693,7 +693,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag allows you to bypass zone casting restrictions and cast {} in this zone.", "Your GM flag allows you to bypass zone casting restrictions and cast {} in this zone.",
Saylink::Silent( Saylink::Silent(
fmt::format( fmt::format(
"#castspell {}", "#castspell {}",
@ -728,7 +728,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag allows you to bypass zone blocked spells and cast {} in this zone.", "Your GM flag allows you to bypass zone blocked spells and cast {} in this zone.",
Saylink::Silent( Saylink::Silent(
fmt::format( fmt::format(
"#castspell {}", "#castspell {}",
@ -783,7 +783,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
LogSpells("Spell casting canceled [{}] : can not cast outdoors.", spell_id); LogSpells("Spell casting canceled [{}] : can not cast outdoors.", spell_id);
return false; return false;
} else { } else {
Message(Chat::White, "Your GM Flag allows you to cast outdoor spells when indoors."); Message(Chat::White, "Your GM flag allows you to cast outdoor spells when indoors.");
} }
} }
} }
@ -1101,7 +1101,7 @@ bool Client::CheckFizzle(uint16 spell_id)
{ {
// GMs don't fizzle // GMs don't fizzle
if (GetGM()) { if (GetGM()) {
Message(Chat::White, "Your GM Flag prevents you from fizzling."); Message(Chat::White, "Your GM flag prevents you from fizzling.");
return true; return true;
} }
@ -1687,7 +1687,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if (c->GetGM()) { if (c->GetGM()) {
c->Message( c->Message(
Chat::White, Chat::White,
"Your GM Flag allows you to finish casting even though you're missing a required instrument." "Your GM flag allows you to finish casting even though you're missing a required instrument."
); );
} else { } else {
InterruptSpell(); InterruptSpell();
@ -1728,7 +1728,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if (c->GetGM()) { if (c->GetGM()) {
c->Message( c->Message(
Chat::White, Chat::White,
"Your GM Flag allows you to finish casting even though you're missing required components." "Your GM flag allows you to finish casting even though you're missing required components."
); );
} else { } else {
InterruptSpell(); InterruptSpell();

View File

@ -124,7 +124,7 @@ bool Client::HasTaskRequestCooldownTimer()
} }
if (GetGM()) { if (GetGM()) {
Message(Chat::White, "Your GM Flag prevents you from having a task request cooldown."); Message(Chat::White, "Your GM flag prevents you from having a task request cooldown.");
} }
return (!GetGM() && task_request_timer.Enabled()); return (!GetGM() && task_request_timer.Enabled());

View File

@ -1096,7 +1096,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
zone->random.Roll(aa_chance) zone->random.Roll(aa_chance)
) { ) {
if (GetGM()) { if (GetGM()) {
Message(Chat::White, "Your GM Flag gives you a 100% chance to succeed in combining this tradeskill."); Message(Chat::White, "Your GM flag gives you a 100% chance to succeed in combining this tradeskill.");
} }
success_modifier = 1; success_modifier = 1;

View File

@ -819,7 +819,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
Message( Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Your GM Flag allows you to give {} to {}.", "Your GM flag allows you to give {} to {}.",
item_link, item_link,
GetTargetDescription(tradingWith) GetTargetDescription(tradingWith)
).c_str() ).c_str()

View File

@ -99,7 +99,7 @@ bool Trap::Process()
} }
if (is_gm_client) { if (is_gm_client) {
m->Message(Chat::White, "Your GM Flag prevents you from triggering a trap."); m->Message(Chat::White, "Your GM flag prevents you from triggering a trap.");
} }
} }
else if (reset_timer.Enabled() && reset_timer.Check()) else if (reset_timer.Enabled() && reset_timer.Check())
@ -321,7 +321,7 @@ Mob* EntityList::GetTrapTrigger(Trap* trap)
} }
if (cur->GetGM()) { if (cur->GetGM()) {
cur->Message(Chat::White, "Your GM Flag prevents you from triggering a trap."); cur->Message(Chat::White, "Your GM flag prevents you from triggering a trap.");
} }
} }
else else

View File

@ -373,8 +373,8 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
} }
if (content_service.GetCurrentExpansion() >= Expansion::Classic && GetGM()) { if (content_service.GetCurrentExpansion() >= Expansion::Classic && GetGM()) {
LogInfo("[{}] Bypassing zone expansion checks because GM Flag is set", GetCleanName()); LogInfo("[{}] Bypassing zone expansion checks because GM flag is set", GetCleanName());
Message(Chat::White, "Your GM Flag allows you to bypass zone expansion checks."); Message(Chat::White, "Your GM flag allows you to bypass zone expansion checks.");
} }
if (zoning_message == ZoningMessage::ZoneSuccess) { if (zoning_message == ZoningMessage::ZoneSuccess) {