mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Implement number of hit indicators for UF and RoF
There is a small display bug with the initial cast of the spell, but it updates quickly enough that it shouldn't be too noticeable This still needs to be fixed though Changed SendBuffDurationPacket to take a Buffs_Struct by reference to allow more of the data to be obtained without more params Added Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
This commit is contained in:
+31
-39
@@ -3395,7 +3395,7 @@ void Mob::BuffProcess()
|
||||
{
|
||||
if(buffs[buffs_i].UpdateClient == true)
|
||||
{
|
||||
CastToClient()->SendBuffDurationPacket(buffs[buffs_i].spellid, buffs[buffs_i].ticsremaining, buffs[buffs_i].casterlevel);
|
||||
CastToClient()->SendBuffDurationPacket(buffs[buffs_i]);
|
||||
buffs[buffs_i].UpdateClient = false;
|
||||
}
|
||||
}
|
||||
@@ -5559,64 +5559,56 @@ void Mob::CheckNumHitsRemaining(uint8 type, uint32 buff_slot, uint16 spell_id)
|
||||
uint32 buff_max = GetMaxTotalSlots();
|
||||
|
||||
//Spell specific procs [Type 7,10,11]
|
||||
if (IsValidSpell(spell_id)){
|
||||
|
||||
for(uint32 d = 0; d < buff_max; d++) {
|
||||
|
||||
if((buffs[d].spellid == spell_id) && (buffs[d].numhits > 0) && (spells[buffs[d].spellid].numhitstype == type)){
|
||||
|
||||
if(--buffs[d].numhits == 0) {
|
||||
if (IsValidSpell(spell_id)) {
|
||||
for (uint32 d = 0; d < buff_max; d++) {
|
||||
if (buffs[d].spellid == spell_id && buffs[d].numhits > 0 &&
|
||||
spells[buffs[d].spellid].numhitstype == type) {
|
||||
if (--buffs[d].numhits == 0) {
|
||||
CastOnNumHitFade(buffs[d].spellid);
|
||||
if(!TryFadeEffect(d))
|
||||
if (!TryFadeEffect(d))
|
||||
BuffFadeBySlot(d, true);
|
||||
} else if (IsClient()) { // still have numhits and client, update
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[d], d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (type == 7){
|
||||
if (buff_slot > 0){
|
||||
|
||||
if(--buffs[buff_slot].numhits == 0) {
|
||||
} else if (type == 7) {
|
||||
if (buff_slot > 0) {
|
||||
if (--buffs[buff_slot].numhits == 0) {
|
||||
CastOnNumHitFade(buffs[buff_slot].spellid);
|
||||
if(!TryFadeEffect(buff_slot))
|
||||
if (!TryFadeEffect(buff_slot))
|
||||
BuffFadeBySlot(buff_slot , true);
|
||||
}
|
||||
} else if (IsClient()) { // still have numhits and client, update
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[buff_slot], buff_slot);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
for(int d = 0; d < buff_max; d++) {
|
||||
|
||||
if(!m_spellHitsLeft[d])
|
||||
} else {
|
||||
for (int d = 0; d < buff_max; d++) {
|
||||
if (!m_spellHitsLeft[d])
|
||||
continue;
|
||||
|
||||
if ((IsValidSpell(buffs[d].spellid)) && (m_spellHitsLeft[d] == buffs[d].spellid)) {
|
||||
if(--buffs[d].numhits == 0) {
|
||||
if (IsValidSpell(buffs[d].spellid) && m_spellHitsLeft[d] == buffs[d].spellid) {
|
||||
if (--buffs[d].numhits == 0) {
|
||||
CastOnNumHitFade(buffs[d].spellid);
|
||||
m_spellHitsLeft[d] = 0;
|
||||
if(!TryFadeEffect(d))
|
||||
if (!TryFadeEffect(d))
|
||||
BuffFadeBySlot(d, true);
|
||||
} else if (IsClient()) { // still have numhits and client, update
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[d], d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else{
|
||||
|
||||
for(uint32 d = 0; d < buff_max; d++) {
|
||||
|
||||
if((IsValidSpell(buffs[d].spellid)) && (buffs[d].numhits > 0) && (spells[buffs[d].spellid].numhitstype == type)){
|
||||
|
||||
if(--buffs[d].numhits == 0) {
|
||||
} else {
|
||||
for (uint32 d = 0; d < buff_max; d++) {
|
||||
if (IsValidSpell(buffs[d].spellid) && buffs[d].numhits > 0 &&
|
||||
spells[buffs[d].spellid].numhitstype == type) {
|
||||
if (--buffs[d].numhits == 0) {
|
||||
CastOnNumHitFade(buffs[d].spellid);
|
||||
if(!TryFadeEffect(d)){
|
||||
if (!TryFadeEffect(d))
|
||||
BuffFadeBySlot(d, true);
|
||||
}
|
||||
} else if (IsClient()) { // still have numhits and client, update
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[d], d);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user