mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Little bit of cleanup
This commit is contained in:
parent
92cc457067
commit
ce3d3153d8
@ -457,10 +457,11 @@ enum ServerLockType : int {
|
|||||||
Unlock
|
Unlock
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Invisibility : uint8 {
|
enum Invisibility : uint16 {
|
||||||
Visible,
|
Visible,
|
||||||
Invisible,
|
Invisible,
|
||||||
Special = 255
|
Special = 255,
|
||||||
|
GMInvis = 3001
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AugmentActions : int {
|
enum AugmentActions : int {
|
||||||
|
|||||||
@ -13168,7 +13168,7 @@ void Client::BroadcastPositionUpdate()
|
|||||||
void Client::SetVisibility(Mob* mob, bool visible) {
|
void Client::SetVisibility(Mob* mob, bool visible) {
|
||||||
mob->SendAppearancePacket(
|
mob->SendAppearancePacket(
|
||||||
AppearanceType::Invisibility,
|
AppearanceType::Invisibility,
|
||||||
visible ? m_invisibility_state : 3001, // reset back to original visibility state when visible
|
visible ? m_invisibility_state : Invisibility::GMInvis, // reset back to original visibility state when visible
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
this
|
this
|
||||||
|
|||||||
@ -4960,7 +4960,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
CheckScanCloseMobsMovingTimer();
|
CheckScanCloseMobsMovingTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// see_close
|
if (RuleB(Zone, EnableEntityClipping)) {
|
||||||
if (moving) {
|
if (moving) {
|
||||||
if (m_see_close_mobs_timer.GetRemainingTime() > 1000) {
|
if (m_see_close_mobs_timer.GetRemainingTime() > 1000) {
|
||||||
m_see_close_mobs_timer.Disable();
|
m_see_close_mobs_timer.Disable();
|
||||||
@ -4973,6 +4973,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
m_see_close_mobs_timer.Start(60000);
|
m_see_close_mobs_timer.Start(60000);
|
||||||
m_see_close_mobs_timer.Trigger();
|
m_see_close_mobs_timer.Trigger();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CheckSendBulkClientPositionUpdate();
|
CheckSendBulkClientPositionUpdate();
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,6 @@ int command_init(void)
|
|||||||
command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", AccountStatus::GMLeadAdmin, command_suspend) ||
|
command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", AccountStatus::GMLeadAdmin, command_suspend) ||
|
||||||
command_add("suspendmulti", "[Character Name One|Character Name Two|etc] [Days] [Reason] - Suspend multiple characters by name for specified number of days", AccountStatus::GMLeadAdmin, command_suspendmulti) ||
|
command_add("suspendmulti", "[Character Name One|Character Name Two|etc] [Days] [Reason] - Suspend multiple characters by name for specified number of days", AccountStatus::GMLeadAdmin, command_suspendmulti) ||
|
||||||
command_add("takeplatinum", "[Platinum] - Takes specified amount of platinum from you or your player target", AccountStatus::GMMgmt, command_takeplatinum) ||
|
command_add("takeplatinum", "[Platinum] - Takes specified amount of platinum from you or your player target", AccountStatus::GMMgmt, command_takeplatinum) ||
|
||||||
command_add("test", "Test Command", AccountStatus::GMLeadAdmin, command_test) ||
|
|
||||||
command_add("task", "(subcommand) - Task system commands", AccountStatus::GMLeadAdmin, command_task) ||
|
command_add("task", "(subcommand) - Task system commands", AccountStatus::GMLeadAdmin, command_task) ||
|
||||||
command_add("petname", "[newname] - Temporarily renames your pet. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_petname) ||
|
command_add("petname", "[newname] - Temporarily renames your pet. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_petname) ||
|
||||||
command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", AccountStatus::GMLeadAdmin, command_traindisc) ||
|
command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", AccountStatus::GMLeadAdmin, command_traindisc) ||
|
||||||
@ -921,7 +920,6 @@ void command_bot(Client *c, const Seperator *sep)
|
|||||||
#include "gm_commands/suspend.cpp"
|
#include "gm_commands/suspend.cpp"
|
||||||
#include "gm_commands/suspendmulti.cpp"
|
#include "gm_commands/suspendmulti.cpp"
|
||||||
#include "gm_commands/takeplatinum.cpp"
|
#include "gm_commands/takeplatinum.cpp"
|
||||||
#include "gm_commands/test.cpp"
|
|
||||||
#include "gm_commands/task.cpp"
|
#include "gm_commands/task.cpp"
|
||||||
#include "gm_commands/traindisc.cpp"
|
#include "gm_commands/traindisc.cpp"
|
||||||
#include "gm_commands/tune.cpp"
|
#include "gm_commands/tune.cpp"
|
||||||
|
|||||||
@ -179,7 +179,6 @@ void command_summonitem(Client *c, const Seperator *sep);
|
|||||||
void command_suspend(Client *c, const Seperator *sep);
|
void command_suspend(Client *c, const Seperator *sep);
|
||||||
void command_suspendmulti(Client *c, const Seperator *sep);
|
void command_suspendmulti(Client *c, const Seperator *sep);
|
||||||
void command_takeplatinum(Client* c, const Seperator* sep);
|
void command_takeplatinum(Client* c, const Seperator* sep);
|
||||||
void command_test(Client *c, const Seperator *sep);
|
|
||||||
void command_task(Client *c, const Seperator *sep);
|
void command_task(Client *c, const Seperator *sep);
|
||||||
void command_petname(Client *c, const Seperator *sep);
|
void command_petname(Client *c, const Seperator *sep);
|
||||||
void command_traindisc(Client *c, const Seperator *sep);
|
void command_traindisc(Client *c, const Seperator *sep);
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
void command_test(Client *c, const Seperator *sep)
|
|
||||||
{
|
|
||||||
const int arguments = sep->argnum;
|
|
||||||
|
|
||||||
for (auto &e : entity_list.GetMobList()) {
|
|
||||||
auto mob = e.second;
|
|
||||||
if (Distance(c->GetPosition(), mob->GetPosition()) > 100) {
|
|
||||||
mob->SendAppearancePacket(AppearanceType::Invisibility, 3001);
|
|
||||||
} else {
|
|
||||||
mob->SendAppearancePacket(AppearanceType::Invisibility, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -4127,7 +4127,7 @@ void Mob::SendAppearancePacket(
|
|||||||
auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
|
auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
|
||||||
auto* a = (SpawnAppearance_Struct*)outapp->pBuffer;
|
auto* a = (SpawnAppearance_Struct*)outapp->pBuffer;
|
||||||
|
|
||||||
if (type == AppearanceType::Invisibility && value != 3001) {
|
if (type == AppearanceType::Invisibility && value != Invisibility::GMInvis) {
|
||||||
m_invisibility_state = value;
|
m_invisibility_state = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user