mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-04 01:52:26 +00:00
AA bonus calc -> Mob from Client, Bots should now work with their aa stuff again (untested)
This commit is contained in:
parent
a984e9bd7c
commit
1b088b7157
@ -42,6 +42,7 @@
|
|||||||
void Mob::CalcBonuses()
|
void Mob::CalcBonuses()
|
||||||
{
|
{
|
||||||
CalcSpellBonuses(&spellbonuses);
|
CalcSpellBonuses(&spellbonuses);
|
||||||
|
CalcAABonuses(&aabonuses);
|
||||||
CalcMaxHP();
|
CalcMaxHP();
|
||||||
CalcMaxMana();
|
CalcMaxMana();
|
||||||
SetAttackTimer();
|
SetAttackTimer();
|
||||||
@ -51,9 +52,7 @@ void Mob::CalcBonuses()
|
|||||||
|
|
||||||
void NPC::CalcBonuses()
|
void NPC::CalcBonuses()
|
||||||
{
|
{
|
||||||
Mob::CalcBonuses();
|
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||||
memset(&aabonuses, 0, sizeof(StatBonuses));
|
|
||||||
|
|
||||||
if(RuleB(NPC, UseItemBonusesForNonPets)){
|
if(RuleB(NPC, UseItemBonusesForNonPets)){
|
||||||
memset(&itembonuses, 0, sizeof(StatBonuses));
|
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||||
CalcItemBonuses(&itembonuses);
|
CalcItemBonuses(&itembonuses);
|
||||||
@ -74,12 +73,8 @@ void Client::CalcBonuses()
|
|||||||
memset(&itembonuses, 0, sizeof(StatBonuses));
|
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||||
CalcItemBonuses(&itembonuses);
|
CalcItemBonuses(&itembonuses);
|
||||||
CalcEdibleBonuses(&itembonuses);
|
CalcEdibleBonuses(&itembonuses);
|
||||||
|
|
||||||
CalcSpellBonuses(&spellbonuses);
|
CalcSpellBonuses(&spellbonuses);
|
||||||
|
CalcAABonuses(&aabonuses);
|
||||||
Log.Out(Logs::Detail, Logs::AA, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
|
||||||
CalcAABonuses(&aabonuses); //we're not quite ready for this
|
|
||||||
Log.Out(Logs::Detail, Logs::AA, "Finished calculating AA Bonuses for %s.", this->GetCleanName());
|
|
||||||
|
|
||||||
ProcessItemCaps(); // caps that depend on spell/aa bonuses
|
ProcessItemCaps(); // caps that depend on spell/aa bonuses
|
||||||
|
|
||||||
@ -635,7 +630,7 @@ void Client::CalcEdibleBonuses(StatBonuses* newbon) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::CalcAABonuses(StatBonuses *newbon)
|
void Mob::CalcAABonuses(StatBonuses *newbon)
|
||||||
{
|
{
|
||||||
memset(newbon, 0, sizeof(StatBonuses)); // start fresh
|
memset(newbon, 0, sizeof(StatBonuses)); // start fresh
|
||||||
|
|
||||||
@ -659,7 +654,7 @@ void Client::CalcAABonuses(StatBonuses *newbon)
|
|||||||
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in common/spdat.h).
|
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in common/spdat.h).
|
||||||
//For now, we'll just put them directly into the code and comment with the corresponding normal function
|
//For now, we'll just put them directly into the code and comment with the corresponding normal function
|
||||||
//Maybe we'll fix it later? :-D
|
//Maybe we'll fix it later? :-D
|
||||||
void Client::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||||
{
|
{
|
||||||
if (rank.effects.empty()) // sanity check. why bother if no slots to fill?
|
if (rank.effects.empty()) // sanity check. why bother if no slots to fill?
|
||||||
return;
|
return;
|
||||||
|
|||||||
1533
zone/bot.cpp
1533
zone/bot.cpp
File diff suppressed because it is too large
Load Diff
@ -449,7 +449,6 @@ public:
|
|||||||
bool IsBotWISCaster() { return (GetClass() == CLERIC || GetClass() == DRUID || GetClass() == SHAMAN); }
|
bool IsBotWISCaster() { return (GetClass() == CLERIC || GetClass() == DRUID || GetClass() == SHAMAN); }
|
||||||
bool CanHeal();
|
bool CanHeal();
|
||||||
int GetRawACNoShield(int &shield_ac);
|
int GetRawACNoShield(int &shield_ac);
|
||||||
void ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon);
|
|
||||||
bool GetHasBeenSummoned() { return _hasBeenSummoned; }
|
bool GetHasBeenSummoned() { return _hasBeenSummoned; }
|
||||||
const glm::vec3 GetPreSummonLocation() const { return m_PreSummonLocation; }
|
const glm::vec3 GetPreSummonLocation() const { return m_PreSummonLocation; }
|
||||||
bool GetGroupMessagesOn() { return _groupMessagesOn; }
|
bool GetGroupMessagesOn() { return _groupMessagesOn; }
|
||||||
@ -561,7 +560,7 @@ protected:
|
|||||||
virtual bool CheckBotDoubleAttack(bool Triple = false);
|
virtual bool CheckBotDoubleAttack(bool Triple = false);
|
||||||
virtual int32 GetBotFocusEffect(BotfocusType bottype, uint16 spell_id);
|
virtual int32 GetBotFocusEffect(BotfocusType bottype, uint16 spell_id);
|
||||||
virtual int32 CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus=false);
|
virtual int32 CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spell_id, bool best_focus=false);
|
||||||
virtual int32 CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id);
|
virtual int32 CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint32 points, uint16 spell_id);
|
||||||
virtual void PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* client);
|
virtual void PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* client);
|
||||||
virtual bool AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0);
|
virtual bool AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0);
|
||||||
virtual float GetMaxMeleeRangeToTarget(Mob* target);
|
virtual float GetMaxMeleeRangeToTarget(Mob* target);
|
||||||
@ -642,12 +641,12 @@ private:
|
|||||||
uint8 _baseGender; // Bots gender. Necessary to preserve the original value otherwise it can be changed by illusions.
|
uint8 _baseGender; // Bots gender. Necessary to preserve the original value otherwise it can be changed by illusions.
|
||||||
|
|
||||||
// Class Methods
|
// Class Methods
|
||||||
|
void LoadAAs();
|
||||||
int32 acmod();
|
int32 acmod();
|
||||||
void GenerateBaseStats();
|
void GenerateBaseStats();
|
||||||
void GenerateAppearance();
|
void GenerateAppearance();
|
||||||
void GenerateArmorClass();
|
void GenerateArmorClass();
|
||||||
int32 GenerateBaseHitPoints();
|
int32 GenerateBaseHitPoints();
|
||||||
void GenerateAABonuses(StatBonuses* newbon);
|
|
||||||
int32 GenerateBaseManaPoints();
|
int32 GenerateBaseManaPoints();
|
||||||
void GenerateSpecialAttacks();
|
void GenerateSpecialAttacks();
|
||||||
void SetBotID(uint32 botID);
|
void SetBotID(uint32 botID);
|
||||||
|
|||||||
@ -1260,8 +1260,6 @@ protected:
|
|||||||
void AdditiveWornBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug = false);
|
void AdditiveWornBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug = false);
|
||||||
int CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat);
|
int CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat);
|
||||||
void CalcEdibleBonuses(StatBonuses* newbon);
|
void CalcEdibleBonuses(StatBonuses* newbon);
|
||||||
void CalcAABonuses(StatBonuses* newbon);
|
|
||||||
void ApplyAABonuses(const AA::Rank &rank, StatBonuses* newbon);
|
|
||||||
void ProcessItemCaps();
|
void ProcessItemCaps();
|
||||||
void MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message = true);
|
void MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message = true);
|
||||||
bool client_data_loaded;
|
bool client_data_loaded;
|
||||||
|
|||||||
@ -967,6 +967,8 @@ public:
|
|||||||
bool CanPurchaseAlternateAdvancementRank(AA::Rank *rank, bool check_price);
|
bool CanPurchaseAlternateAdvancementRank(AA::Rank *rank, bool check_price);
|
||||||
int GetAlternateAdvancementCooldownReduction(AA::Rank *rank_in);
|
int GetAlternateAdvancementCooldownReduction(AA::Rank *rank_in);
|
||||||
void ExpendAlternateAdvancementCharge(uint32 aa_id);
|
void ExpendAlternateAdvancementCharge(uint32 aa_id);
|
||||||
|
void CalcAABonuses(StatBonuses* newbon);
|
||||||
|
void ApplyAABonuses(const AA::Rank &rank, StatBonuses* newbon);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CommonDamage(Mob* other, int32 &damage, const uint16 spell_id, const SkillUseTypes attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic);
|
void CommonDamage(Mob* other, int32 &damage, const uint16 spell_id, const SkillUseTypes attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user