mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 05:16:37 +00:00
Refactor message functions
This commit is contained in:
+23
-9
@@ -578,7 +578,7 @@ void NPC::AI_Stop() {
|
||||
|
||||
void Client::AI_Stop() {
|
||||
Mob::AI_Stop();
|
||||
this->Message_StringID(Chat::Red,PLAYER_REGAIN);
|
||||
this->MessageString(Chat::Red,PLAYER_REGAIN);
|
||||
|
||||
auto app = new EQApplicationPacket(OP_Charm, sizeof(Charm_Struct));
|
||||
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
|
||||
@@ -2029,14 +2029,14 @@ void Mob::StartEnrage()
|
||||
|
||||
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
|
||||
bEnraged = true;
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
|
||||
}
|
||||
|
||||
void Mob::ProcessEnrage(){
|
||||
if(IsEnraged()){
|
||||
Timer *timer = GetSpecialAbilityTimer(SPECATK_ENRAGE);
|
||||
if(timer && timer->Check()){
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
|
||||
|
||||
int enraged_cooldown = GetSpecialAbilityParam(SPECATK_ENRAGE, 2);
|
||||
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
|
||||
@@ -2057,9 +2057,23 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
|
||||
Mob *target = GetTarget();
|
||||
if (target) {
|
||||
if (!IsPet()) {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
true,
|
||||
200,
|
||||
Chat::NPCFlurry,
|
||||
NPC_FLURRY,
|
||||
GetCleanName(),
|
||||
target->GetCleanName());
|
||||
} else {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
true,
|
||||
200,
|
||||
Chat::PetFlurry,
|
||||
NPC_FLURRY,
|
||||
GetCleanName(),
|
||||
target->GetCleanName());
|
||||
}
|
||||
|
||||
int num_attacks = GetSpecialAbilityParam(SPECATK_FLURRY, 1);
|
||||
@@ -2096,9 +2110,9 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
|
||||
{
|
||||
int index_hit = 0;
|
||||
if (!IsPet())
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
|
||||
else
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
|
||||
|
||||
int rampage_targets = GetSpecialAbilityParam(SPECATK_RAMPAGE, 1);
|
||||
if (rampage_targets == 0) // if set to 0 or not set in the DB
|
||||
@@ -2153,9 +2167,9 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
|
||||
{
|
||||
int index_hit = 0;
|
||||
if (!IsPet()) { // do not know every pet AA so thought it safer to add this
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
|
||||
} else {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
|
||||
}
|
||||
|
||||
int rampage_targets = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 1);
|
||||
|
||||
Reference in New Issue
Block a user