mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Merge pull request #1 from mackal/master
AA reuse timer fix and Update filter system
This commit is contained in:
commit
7c706d9871
@ -1,5 +1,9 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 02/16/2013 ==
|
||||
demonstar55: Fix AA reuse timer calc
|
||||
demonstar55: Remove old filters and change all remaining old to new (Also fix
|
||||
Auction filtering out OOC as well due to incorrect define)
|
||||
|
||||
== 02/12/2013 ==
|
||||
Kayen: AA fix
|
||||
|
||||
@ -425,30 +425,6 @@ typedef enum {
|
||||
FilterShowSelfOnly
|
||||
} eqFilterMode;
|
||||
|
||||
//im lazy today, dont wanna find/replace these
|
||||
#define FILTER_DAMAGESHIELD FilterDamageShields
|
||||
#define FILTER_NPCSPELLS FilterNPCSpells
|
||||
#define FILTER_PCSPELLS FilterPCSpells
|
||||
#define FILTER_BARDSONGS FilterBardSongs
|
||||
#define FILTER_GUILDSAY FilterGuildChat
|
||||
#define FILTER_SOCIALS FilterSocials
|
||||
#define FILTER_GROUP FilterGroupChat
|
||||
#define FILTER_SHOUT FilterShouts
|
||||
#define FILTER_AUCTION FilterAuctions
|
||||
#define FILTER_OOC FilterAuctions
|
||||
#define FILTER_MYMISSES FilterMyMisses
|
||||
#define FILTER_OTHERMISSES FilterOthersMiss
|
||||
#define FILTER_OTHERHITS FilterOthersHit
|
||||
#define FILTER_ATKMISSESME FilterMissedMe
|
||||
#define FILTER_CRITSPELLS FilterSpellCrits
|
||||
#define FILTER_CRITMELEE FilterMeleeCrits
|
||||
#define FILTER_SPELLDAMAGE FilterSpellDamage
|
||||
#define FILTER_DOTDAMAGE FilterDOT
|
||||
#define FILTER_MYPETHITS FilterPetHits
|
||||
#define FILTER_MYPETMISSES FilterPetMisses
|
||||
|
||||
|
||||
|
||||
#define STAT_STR 0
|
||||
#define STAT_STA 1
|
||||
#define STAT_AGI 2
|
||||
|
||||
@ -1347,7 +1347,8 @@ void Client::SendAA(uint32 id, int seq) {
|
||||
|
||||
if(value > 0)
|
||||
{
|
||||
const AA_DBAction *caa = &AA_Actions[saa->id][value - 1];
|
||||
// AA_Action stores the base ID
|
||||
const AA_DBAction *caa = &AA_Actions[saa->id - value + 1][value - 1];
|
||||
|
||||
if(caa && caa->reuse_time > 0)
|
||||
saa->spell_refresh = CalcAAReuseTimer(caa);
|
||||
@ -1965,4 +1966,4 @@ AA_SwarmPetInfo::~AA_SwarmPetInfo()
|
||||
Mob *AA_SwarmPetInfo::GetOwner()
|
||||
{
|
||||
return entity_list.GetMobID(owner_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3318,7 +3318,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
int32 origdmg = damage;
|
||||
damage = AffectMagicalDamage(damage, spell_id, iBuffTic, attacker);
|
||||
if (origdmg != damage && attacker && attacker->IsClient()) {
|
||||
if(attacker->CastToClient()->GetFilter(FILTER_DAMAGESHIELD) != FilterHide)
|
||||
if(attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide)
|
||||
attacker->Message(15, "The Spellshield absorbed %d of %d points of damage", origdmg - damage, origdmg);
|
||||
}
|
||||
if (damage == 0 && attacker && origdmg != damage && IsClient()) {
|
||||
@ -3505,11 +3505,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
if(spell_id != SPELL_UNKNOWN)
|
||||
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
|
||||
else
|
||||
filter = FILTER_MYPETHITS;
|
||||
filter = FilterPetHits;
|
||||
} else if(damage == -5)
|
||||
filter = FilterNone; //cant filter invulnerable
|
||||
else
|
||||
filter = FILTER_MYPETMISSES;
|
||||
filter = FilterPetMisses;
|
||||
|
||||
if(!FromDamageShield)
|
||||
owner->CastToClient()->QueuePacket(outapp,true,CLIENT_CONNECTED,filter);
|
||||
@ -3542,7 +3542,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
} else if(damage == -5)
|
||||
filter = FilterNone; //cant filter invulnerable
|
||||
else
|
||||
filter = FILTER_MYMISSES;
|
||||
filter = FilterMyMisses;
|
||||
|
||||
attacker->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
|
||||
}
|
||||
@ -3555,11 +3555,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
if(spell_id != SPELL_UNKNOWN)
|
||||
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
|
||||
else
|
||||
filter = FILTER_OTHERHITS;
|
||||
filter = FilterOthersHit;
|
||||
} else if(damage == -5)
|
||||
filter = FilterNone; //cant filter invulnerable
|
||||
else
|
||||
filter = FILTER_OTHERMISSES;
|
||||
filter = FilterOthersMiss;
|
||||
//make attacker (the attacker) send the packet so we can skip them and the owner
|
||||
//this call will send the packet to `this` as well (using the wrong filter) (will not happen until PC charm works)
|
||||
//LogFile->write(EQEMuLog::Debug, "Queue damage to all except %s with filter %d (%d), type %d", skip->GetName(), filter, IsClient()?CastToClient()->GetFilter(filter):-1, a->type);
|
||||
|
||||
@ -1093,7 +1093,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
char *Buffer = (char *)es;
|
||||
Buffer += 4;
|
||||
snprintf(Buffer, sizeof(Emote_Struct) - 4, "%s %s", GetName(), message);
|
||||
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FILTER_SOCIALS);
|
||||
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FilterSocials);
|
||||
safe_delete(outapp);
|
||||
|
||||
break;
|
||||
|
||||
@ -7442,7 +7442,7 @@ void Client::Handle_OP_Emote(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
*/
|
||||
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FILTER_SOCIALS);
|
||||
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FilterSocials);
|
||||
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
|
||||
@ -1303,9 +1303,9 @@ void EntityList::ChannelMessage(Mob* from, uint8 chan_num, uint8 language, uint8
|
||||
Client* client = iterator.GetData();
|
||||
eqFilterType filter = FilterNone;
|
||||
if(chan_num==3)//shout
|
||||
filter=FILTER_SHOUT;
|
||||
filter=FilterShouts;
|
||||
else if(chan_num==4) //auction
|
||||
filter=FILTER_AUCTION;
|
||||
filter=FilterAuctions;
|
||||
|
||||
if (chan_num != 8 || client->Dist(*from) < 200) // Only say is limited in range
|
||||
{
|
||||
@ -2258,10 +2258,10 @@ void EntityList::ChannelMessageFromWorld(const char* from, const char* to, uint8
|
||||
continue;
|
||||
if(!guild_mgr.CheckPermission(guild_id, client->GuildRank(), GUILD_HEAR))
|
||||
continue;
|
||||
if(client->GetFilter(FILTER_GUILDSAY) == FilterHide)
|
||||
if(client->GetFilter(FilterGuildChat) == FilterHide)
|
||||
continue;
|
||||
} else if(chan_num == 5) {
|
||||
if(client->GetFilter(FILTER_OOC) == FilterHide)
|
||||
if(client->GetFilter(FilterOOC) == FilterHide)
|
||||
continue;
|
||||
}
|
||||
client->ChannelMessageSend(from, to, chan_num, language, message);
|
||||
|
||||
@ -752,7 +752,7 @@ void Group::GroupMessage(Mob* sender, uint8 language, uint8 lang_skill, const ch
|
||||
if(!members[i])
|
||||
continue;
|
||||
|
||||
if (members[i]->IsClient() && members[i]->CastToClient()->GetFilter(FILTER_GROUP)!=0)
|
||||
if (members[i]->IsClient() && members[i]->CastToClient()->GetFilter(FilterGroupChat)!=0)
|
||||
members[i]->CastToClient()->ChannelMessageSend(sender->GetName(),members[i]->GetName(),2,language,lang_skill,message);
|
||||
}
|
||||
|
||||
|
||||
@ -776,7 +776,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
|
||||
ic->messageid = message_other;
|
||||
ic->spawnid = GetID();
|
||||
strcpy(ic->message, GetCleanName());
|
||||
entity_list.QueueCloseClients(this, outapp, true, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(this, outapp, true, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
safe_delete(outapp);
|
||||
|
||||
}
|
||||
@ -1952,7 +1952,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
}
|
||||
}
|
||||
|
||||
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
|
||||
// Set and send the nimbus effect if this spell has one
|
||||
int NimbusEffect = GetNimbusEffect(spell_id);
|
||||
@ -2171,7 +2171,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
|
||||
}
|
||||
|
||||
//do we need to do this???
|
||||
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
if(IsClient())
|
||||
CastToClient()->CheckSongSkillIncrease(spell_id);
|
||||
|
||||
@ -2209,7 +2209,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
||||
action->buff_unknown = 0;
|
||||
action->level = buffs[buffs_i].casterlevel;
|
||||
action->type = SpellDamageType;
|
||||
entity_list.QueueCloseClients(this, packet, false, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(this, packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
|
||||
action->buff_unknown = 4;
|
||||
|
||||
@ -2280,7 +2280,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
||||
cd->damage = 0;
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
entity_list.QueueCloseClients(this, message_packet, false, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(this, message_packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
}
|
||||
safe_delete(message_packet);
|
||||
safe_delete(packet);
|
||||
@ -3010,7 +3010,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
if(IsClient()) // send to caster
|
||||
CastToClient()->QueuePacket(action_packet);
|
||||
// send to people in the area, ignoring caster and target
|
||||
entity_list.QueueCloseClients(spelltar, action_packet, true, 200, this, true, spelltar->IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(spelltar, action_packet, true, 200, this, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
|
||||
|
||||
/* Send the EVENT_CAST_ON event */
|
||||
@ -3521,7 +3521,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
cd->damage = 0;
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
entity_list.QueueCloseClients(spelltar, message_packet, false, 200, 0, true, spelltar->IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(spelltar, message_packet, false, 200, 0, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
}
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
|
||||
@ -1344,7 +1344,7 @@ void WorldServer::Process() {
|
||||
if(strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
|
||||
{
|
||||
if(r->members[x].GroupNumber == rmsg->gid){
|
||||
if(r->members[x].member->GetFilter(FILTER_GROUP)!=0)
|
||||
if(r->members[x].member->GetFilter(FilterGroupChat)!=0)
|
||||
{
|
||||
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), 2, 0, rmsg->message);
|
||||
}
|
||||
@ -1369,7 +1369,7 @@ void WorldServer::Process() {
|
||||
if(r->members[x].member){
|
||||
if(strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
|
||||
{
|
||||
if(r->members[x].member->GetFilter(FILTER_GROUP)!=0)
|
||||
if(r->members[x].member->GetFilter(FilterGroupChat)!=0)
|
||||
{
|
||||
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), 15, 0, rmsg->message);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user