diff --git a/zone/aa.cpp b/zone/aa.cpp index 1f0b5b086..766057e2f 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -440,48 +440,6 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration) target->AddToHateList(this, 1, 0); } -//turn on an AA effect -//duration == 0 means no time limit, used for one-shot deals, etc.. -void Client::EnableAAEffect(aaEffectType type, uint32 duration) { - if(type > _maxaaEffectType) - return; //for now, special logic needed. - m_epp.aa_effects |= 1 << (type-1); - - if(duration > 0) { - p_timers.Start(pTimerAAEffectStart + type, duration); - } else { - p_timers.Clear(&database, pTimerAAEffectStart + type); - } -} - -void Client::DisableAAEffect(aaEffectType type) { - if(type > _maxaaEffectType) - return; //for now, special logic needed. - uint32 bit = 1 << (type-1); - if(m_epp.aa_effects & bit) { - m_epp.aa_effects ^= bit; - } - p_timers.Clear(&database, pTimerAAEffectStart + type); -} - -/* -By default an AA effect is a one shot deal, unless -a duration timer is set. -*/ -bool Client::CheckAAEffect(aaEffectType type) { - if(type > _maxaaEffectType) - return(false); //for now, special logic needed. - if(m_epp.aa_effects & (1 << (type-1))) { //is effect enabled? - //has our timer expired? - if(p_timers.Expired(&database, pTimerAAEffectStart + type)) { - DisableAAEffect(type); - return(false); - } - return(true); - } - return(false); -} - void Client::ResetAA() { RefundAA(); uint32 i; @@ -788,14 +746,6 @@ void Client::InspectBuffs(Client* Inspector, int Rank) Inspector->FastQueuePacket(&outapp); } -void Client::DurationRampage(uint32 duration) -{ - if(duration) { - m_epp.aa_effects |= 1 << (aaEffectRampage-1); - p_timers.Start(pTimerAAEffectStart + aaEffectRampage, duration); - } -} - void Client::RefundAA() { int refunded = 0; @@ -933,7 +883,6 @@ void Client::SendAlternateAdvancementRank(int aa_id, int level) { void Client::SendAlternateAdvancementStats() { EQApplicationPacket* outapp = new EQApplicationPacket(OP_AAExpUpdate, sizeof(AltAdvStats_Struct)); AltAdvStats_Struct *aps = (AltAdvStats_Struct *)outapp->pBuffer; - aps->experience = m_pp.expAA; aps->experience = (uint32)(((float)330.0f * (float)m_pp.expAA) / (float)max_AAXP); aps->unspent = m_pp.aapoints; aps->percentage = m_epp.perAA; diff --git a/zone/aa.h b/zone/aa.h index 0ee32c99a..76df0f388 100644 --- a/zone/aa.h +++ b/zone/aa.h @@ -23,21 +23,6 @@ typedef enum { aaActionFadingMemories = 16 } aaNonspellAction; -//use these for AAs which dont cast spells, yet need effects -//if this list grows beyond 32, more work is needed in *AAEffect -typedef enum { //AA Effect IDs - aaEffectMassGroupBuff = 1, //unused - Handled via spell effect. - aaEffectRampage, - aaEffectSharedHealth, - aaEffectFlamingArrows, - aaEffectFrostArrows, - aaEffectWarcry, - aaEffectLeechTouch, - aaEffectProjectIllusion, // unused - Handled via spell effect - _maxaaEffectType = 32 -} aaEffectType; - - enum { //leadership AA indexes groupAAMarkNPC = 0, groupAANPCHealth, diff --git a/zone/attack.cpp b/zone/attack.cpp index fda7837ab..864efa3e7 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3519,14 +3519,6 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons if(damage > 0) { //if there is some damage being done and theres an attacker involved if(attacker) { - if(spell_id == SPELL_HARM_TOUCH2 && attacker->IsClient() && attacker->CastToClient()->CheckAAEffect(aaEffectLeechTouch)){ - int healed = damage; - healed = attacker->GetActSpellHealing(spell_id, healed); - attacker->HealDamage(healed); - entity_list.MessageClose(this, true, 300, MT_Emote, "%s beams a smile at %s", attacker->GetCleanName(), this->GetCleanName() ); - attacker->CastToClient()->DisableAAEffect(aaEffectLeechTouch); - } - // if spell is lifetap add hp to the caster if (spell_id != SPELL_UNKNOWN && IsLifetapSpell( spell_id )) { int healed = damage; diff --git a/zone/client.h b/zone/client.h index 2689964f0..034ff83b4 100644 --- a/zone/client.h +++ b/zone/client.h @@ -541,7 +541,6 @@ public: bool Flurry(); bool Rampage(); - void DurationRampage(uint32 duration); inline uint32 GetEXP() const { return m_pp.exp; } @@ -784,13 +783,7 @@ public: int16 CalcAAFocus(focusType type, const AA::Rank &rank, uint16 spell_id); void SetAATitle(const char *Title); void SetTitleSuffix(const char *txt); - - //old AA Methods that are slated for removal - void MemorizeSpell(uint32 slot,uint32 spellid,uint32 scribing); - void EnableAAEffect(aaEffectType type, uint32 duration = 0); - void DisableAAEffect(aaEffectType type); - bool CheckAAEffect(aaEffectType type); - + void MemorizeSpell(uint32 slot, uint32 spellid, uint32 scribing); int32 acmod(); // Item methods diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 4a16e7698..603636a82 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -391,12 +391,13 @@ bool Client::Process() { } else if (auto_attack_target->GetHP() > -10) // -10 so we can watch people bleed in PvP { - if(CheckAAEffect(aaEffectRampage)) - { - entity_list.AEAttack(this, 30); - } else { + //old aa + //if(CheckAAEffect(aaEffectRampage)) + //{ + // entity_list.AEAttack(this, 30); + //} else { Attack(auto_attack_target, MainPrimary); // Kaiyodo - added attacking hand to arguments - } + //} ItemInst *wpn = GetInv().GetItem(MainPrimary); TryWeaponProc(wpn, auto_attack_target, MainPrimary); @@ -406,11 +407,11 @@ bool Client::Process() { CheckIncreaseSkill(SkillDoubleAttack, auto_attack_target, -10); if(CheckDoubleAttack()) { //should we allow rampage on double attack? - if(CheckAAEffect(aaEffectRampage)) { - entity_list.AEAttack(this, 30); - } else { + //if(CheckAAEffect(aaEffectRampage)) { + // entity_list.AEAttack(this, 30); + //} else { Attack(auto_attack_target, MainPrimary, false); - } + //} } //triple attack: rangers, monks, warriors, berserkers over level 60 @@ -499,21 +500,21 @@ bool Client::Process() { float random = zone->random.Real(0, 1); CheckIncreaseSkill(SkillDualWield, auto_attack_target, -10); if (random < DualWieldProbability){ // Max 78% of DW - if(CheckAAEffect(aaEffectRampage)) { - entity_list.AEAttack(this, 30, MainSecondary); - } else { + //if(CheckAAEffect(aaEffectRampage)) { + // entity_list.AEAttack(this, 30, MainSecondary); + //} else { Attack(auto_attack_target, MainSecondary); // Single attack with offhand - } + //} ItemInst *wpn = GetInv().GetItem(MainSecondary); TryWeaponProc(wpn, auto_attack_target, MainSecondary); if( CanThisClassDoubleAttack() && CheckDoubleAttack()) { - if(CheckAAEffect(aaEffectRampage)) { - entity_list.AEAttack(this, 30, MainSecondary); - } else { - if(auto_attack_target && auto_attack_target->GetHP() > -10) + //if(CheckAAEffect(aaEffectRampage)) { + // entity_list.AEAttack(this, 30, MainSecondary); + //} else { + // if(auto_attack_target && auto_attack_target->GetHP() > -10) Attack(auto_attack_target, MainSecondary); // Single attack with offhand - } + //} } } } diff --git a/zone/command.cpp b/zone/command.cpp index 16f50e7d7..ab2b4ad78 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5555,13 +5555,20 @@ void command_setaapts(Client *c, const Seperator *sep) else if(atoi(sep->arg[2]) <= 0 || atoi(sep->arg[2]) > 200) c->Message(0, "You must have a number greater than 0 for points and no more than 200."); else if(!strcasecmp(sep->arg[1], "group")) { - t->SetLeadershipEXP(atoi(sep->arg[2])*GROUP_EXP_PER_POINT, t->GetRaidEXP()); + t->GetPP().group_leadership_points = atoi(sep->arg[2]); + t->GetPP().group_leadership_exp = 0; + t->Message(MT_Experience, "Setting Group AA points to %u", t->GetPP().group_leadership_points); + t->SendLeadershipEXPUpdate(); } else if(!strcasecmp(sep->arg[1], "raid")) { - t->SetLeadershipEXP(t->GetGroupEXP(), atoi(sep->arg[2])*RAID_EXP_PER_POINT); + t->GetPP().raid_leadership_points = atoi(sep->arg[2]); + t->GetPP().raid_leadership_exp = 0; + t->Message(MT_Experience, "Setting Raid AA points to %u", t->GetPP().raid_leadership_points); + t->SendLeadershipEXPUpdate(); } else { - t->SetEXP(t->GetEXP(),t->GetMaxAAXP()*atoi(sep->arg[2]),false); + t->GetPP().aapoints = atoi(sep->arg[2]); + t->GetPP().expAA = 0; + t->Message(MT_Experience, "Setting personal AA points to %u", t->GetPP().aapoints); t->SendAlternateAdvancementStats(); - t->SendAlternateAdvancementTable(); } } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index a7c5643a1..3c0c8fad4 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -651,27 +651,28 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove group_id_caster = (GetRaid()->GetGroup(CastToClient()) == 0xFFFF) ? 0 : (GetRaid()->GetGroup(CastToClient()) + 1); } } - if(group_id_caster){ - Group *g = entity_list.GetGroupByID(group_id_caster); - uint32 time = spell.base[i]*10; - if(g){ - for(int gi=0; gi < 6; gi++){ - if(g->members[gi] && g->members[gi]->IsClient()) - { - g->members[gi]->CastToClient()->EnableAAEffect(aaEffectWarcry , time); - if (g->members[gi]->GetID() != caster->GetID()) - g->members[gi]->Message(13, "You hear the war cry."); - else - Message(13, "You let loose a fierce war cry."); - } - } - } - } - - else{ - CastToClient()->EnableAAEffect(aaEffectWarcry , time); - Message(13, "You let loose a fierce war cry."); - } + //old aa + //if(group_id_caster){ + // Group *g = entity_list.GetGroupByID(group_id_caster); + // uint32 time = spell.base[i]*10; + // if(g){ + // for(int gi=0; gi < 6; gi++){ + // if(g->members[gi] && g->members[gi]->IsClient()) + // { + // g->members[gi]->CastToClient()->EnableAAEffect(aaEffectWarcry , time); + // if (g->members[gi]->GetID() != caster->GetID()) + // g->members[gi]->Message(13, "You hear the war cry."); + // else + // Message(13, "You let loose a fierce war cry."); + // } + // } + // } + //} + // + //else{ + // CastToClient()->EnableAAEffect(aaEffectWarcry , time); + // Message(13, "You let loose a fierce war cry."); + //} break; } @@ -2232,12 +2233,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove case SE_AEMelee: { + //old aa + #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Duration Rampage"); #endif - if (caster && caster->IsClient()) { // will tidy this up later so that NPCs can duration ramp from spells too - CastToClient()->DurationRampage(effect_value*12); - } + //if (caster && caster->IsClient()) { // will tidy this up later so that NPCs can duration ramp from spells too + // CastToClient()->DurationRampage(effect_value*12); + //} break; } @@ -3435,11 +3438,6 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster) } } - // Check for non buff spell effects to fade - // AE melee effects - if (IsClient()) - CastToClient()->CheckAAEffect(aaEffectRampage); - for (int i = 0; i < EFFECT_COUNT; i++) { if (IsBlankSpellEffect(buff.spellid, i)) continue; diff --git a/zone/spells.cpp b/zone/spells.cpp index ea4d1068b..3ea0a5ddd 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4124,14 +4124,13 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) } return true; } - - else if (IsClient() && CastToClient()->CheckAAEffect(aaEffectWarcry)) - { - Message(13, "Your are immune to fear."); - Log.Out(Logs::Detail, Logs::Spells, "Clients has WarCry effect, immune to fear!"); - caster->Message_StringID(MT_Shout, IMMUNE_FEAR); - return true; - } + //else if (IsClient() && CastToClient()->CheckAAEffect(aaEffectWarcry)) //old aa + //{ + // Message(13, "Your are immune to fear."); + // Log.Out(Logs::Detail, Logs::Spells, "Clients has WarCry effect, immune to fear!"); + // caster->Message_StringID(MT_Shout, IMMUNE_FEAR); + // return true; + //} } if(IsCharmSpell(spell_id))