EvEmu
0.8.4
11 September 2021
|
#include "EffectsProcessor.h"
Public Member Functions | |
FxProc () | |
~FxProc () | |
![]() | |
Singleton () | |
Primary constructor. More... | |
EffectsProcessor.cpp | |
This file is for decoding and processing the effect data Copyright 2017 EVEmu Team : Allan
| |
void | ApplyEffects (InventoryItem *pItem, Character *pChar, ShipItem *pShip, bool update=false) |
void | ParseExpression (InventoryItem *pItem, Expression expression, fxData &data, GenericModule *pMod=nullptr) |
int8 | GetEnvironmentEnum (const std::string &domain) |
int8 | GetAssociationEnum (const std::string &association) |
const char * | GetSourceName (int8 id) |
const char * | GetMathMethodName (int8 id) |
const char * | GetTargLocName (int8 id) |
const char * | GetStateName (int8 id) |
EvilNumber | CalculateAttributeValue (EvilNumber val1, EvilNumber val2, int8 method) |
void | DecodeEffects (const uint16 fxID) |
void | EvaluateExpression (const uint16 expID, const char *type) |
void | DecodeExpression (Expression expression, fxData &data) |
Additional Inherited Members | |
![]() | |
static FxProc & | get () |
![]() | |
static std::shared_ptr< FxProc > | mInstance |
Definition at line 22 of file EffectsProcessor.h.
|
inline |
Definition at line 26 of file EffectsProcessor.h.
|
inline |
Definition at line 27 of file EffectsProcessor.h.
void FxProc::ApplyEffects | ( | InventoryItem * | pItem, |
Character * | pChar, | ||
ShipItem * | pShip, | ||
bool | update = false |
||
) |
@note these are processed and applied in fleet code case Target::Ship: {
....ship of member to apply leader's skill bonuses to itemRefVec.push_back(static_cast<InventoryItemRef>(pShip)); } break; case Target::Char: { ....our character itemRefVec.push_back(static_cast<InventoryItemRef>(pChar)); } break;
Definition at line 273 of file EffectsProcessor.cpp.
References _log, Profile::applyFX, FX::Target::Area, CalculateAttributeValue(), FX::Target::Char, EVEDB::invCategories::Charge, InventoryItem::ClearModifiers(), EvilOne, EvilZero, flagNone, FX::Source::Gang, EvilNumber::get_float(), ModuleManager::GetLoadedChargeOnModule(), ModuleManager::GetLoadedCharges(), GetMathMethodName(), ModuleManager::GetModule(), ModuleManager::GetModuleListByReqSkill(), ModuleManager::GetModuleListOfRefsAsc(), ShipItem::GetModuleManager(), Character::GetSkillsList(), GetSourceName(), ShipItem::GetTargetRef(), GetTargLocName(), GetTimeUSeconds(), Inv::Update::Group, InventoryItem::HasReqSkill(), EVEDB::invTypes::Invalid, Calendar::Flag::Invalid, item(), InventoryItem::m_modifiers, Corp::RoleLoc::Other, Inv::Update::Owner, FX::Math::PostDiv, FX::Math::PostMul, FX::Target::PowerCore, FX::Math::PreDiv, FX::Math::PreMul, sConfig, FX::Source::Self, Scanning::Group::Ship, EVEDB::invCategories::Skill, skillID(), sProfiler, FX::Source::Target, and EvE::traceStack().
EvilNumber FxProc::CalculateAttributeValue | ( | EvilNumber | val1, |
EvilNumber | val2, | ||
int8 | method | ||
) |
Definition at line 524 of file EffectsProcessor.cpp.
References _log, EvilZero, FX::Math::Invalid, FX::Math::ModAdd, FX::Math::ModSub, FX::Math::PostAssignment, FX::Math::PostDiv, FX::Math::PostMul, FX::Math::PostPercent, FX::Math::PreAssignment, FX::Math::PreDiv, FX::Math::PreMul, FX::Math::RevPostPercent, and FX::Math::SkillCheck.
Referenced by ApplyEffects().
void FxProc::DecodeEffects | ( | const uint16 | fxID | ) |
Definition at line 680 of file EffectsProcessor.cpp.
References EvaluateExpression(), sFxDataMgr, and sLog.
|
protected |
Definition at line 703 of file EffectsProcessor.cpp.
References FX::Operands::AGRSM, FX::Operands::AGSM, FX::Operands::AIM, FX::Operands::ALGM, FX::Operands::ALM, FX::Operands::ALRSM, FX::Operands::AORSM, Expression::arg1, Expression::arg2, FX::Operands::ATT, FX::Operands::COMBINE, FX::Operands::DEFASSOCIATION, FX::Operands::DEFATTRIBUTE, FX::Operands::DEFBOOL, FX::Operands::DEFENVIDX, FX::Operands::DEFGROUP, FX::Operands::DEFINT, FX::Operands::DEFTYPEID, FX::Operands::EFF, Expression::expressionAttributeID, Expression::expressionGroupID, Expression::expressionTypeID, Expression::expressionValue, fxData::fxSrc, FX::Operands::GA, FX::Operands::GET, GetAssociationEnum(), GetEnvironmentEnum(), FX::Operands::GETTYPE, FX::Operands::GM, Inv::Update::Group, fxData::grpID, Acct::Type::IA, Calendar::Flag::Invalid, FX::Operands::LG, fxData::math, Expression::operandID, FX::Operands::RGGM, FX::Operands::RGORSM, FX::Operands::RGRSM, FX::Operands::RGSM, FX::Operands::RIM, FX::Operands::RLGM, FX::Operands::RLM, FX::Operands::RLRSM, FX::Operands::RORSM, FX::Operands::RSA, sFxDataMgr, fxData::srcAttr, fxData::srcRef, FX::Operands::SRLG, fxData::targAttr, fxData::targLoc, and fxData::typeID.
Referenced by EvaluateExpression().
|
protected |
Definition at line 686 of file EffectsProcessor.cpp.
References DecodeExpression(), Expression::description, Expression::expressionName, fxData::fxSrc, GetMathMethodName(), GetSourceName(), GetTargLocName(), if(), fxData::math, sFxDataMgr, sLog, fxData::srcAttr, fxData::targAttr, and fxData::targLoc.
Referenced by DecodeEffects().
int8 FxProc::GetAssociationEnum | ( | const std::string & | association | ) |
Definition at line 559 of file EffectsProcessor.cpp.
References FX::Math::AddRate, FX::Math::Invalid, FX::Math::ModAdd, FX::Math::ModSub, FX::Math::PostAssignment, FX::Math::PostDiv, FX::Math::PostMul, FX::Math::PostPercent, FX::Math::PreAssignment, FX::Math::PreDiv, FX::Math::PreMul, FX::Math::SkillCheck, and FX::Math::SubRate.
Referenced by DecodeExpression(), and ParseExpression().
int8 FxProc::GetEnvironmentEnum | ( | const std::string & | domain | ) |
Definition at line 590 of file EffectsProcessor.cpp.
References FX::Target::Area, FX::Target::Char, FX::Target::Charge, FX::Target::Invalid, FX::Target::Other, FX::Target::Self, FX::Target::Ship, and FX::Target::Target.
Referenced by DecodeExpression(), and ParseExpression().
const char * FxProc::GetMathMethodName | ( | int8 | id | ) |
Definition at line 611 of file EffectsProcessor.cpp.
References FX::Math::AddRate, FX::Math::Invalid, FX::Math::ModAdd, FX::Math::ModSub, FX::Math::PostAssignment, FX::Math::PostDiv, FX::Math::PostMul, FX::Math::PostPercent, FX::Math::PreAssignment, FX::Math::PreDiv, FX::Math::PreMul, FX::Math::RevPostPercent, FX::Math::SkillCheck, and FX::Math::SubRate.
Referenced by ApplyEffects(), and EvaluateExpression().
const char * FxProc::GetSourceName | ( | int8 | id | ) |
Definition at line 632 of file EffectsProcessor.cpp.
References FX::Source::Gang, FX::Source::Group, FX::Source::Invalid, FX::Source::Owner, FX::Source::Self, FX::Source::Ship, FX::Source::Skill, and FX::Source::Target.
Referenced by ApplyEffects(), and EvaluateExpression().
const char * FxProc::GetStateName | ( | int8 | id | ) |
Definition at line 662 of file EffectsProcessor.cpp.
References FX::State::Active, FX::State::Area, FX::State::Dungeon, FX::State::Invalid, FX::State::Online, FX::State::Overloaded, FX::State::Passive, FX::State::System, and FX::State::Target.
const char * FxProc::GetTargLocName | ( | int8 | id | ) |
Definition at line 647 of file EffectsProcessor.cpp.
References FX::Target::Area, FX::Target::Char, FX::Target::Charge, FX::Target::Invalid, FX::Target::Other, FX::Target::Self, FX::Target::Ship, and FX::Target::Target.
Referenced by ApplyEffects(), and EvaluateExpression().
void FxProc::ParseExpression | ( | InventoryItem * | pItem, |
Expression | expression, | ||
fxData & | data, | ||
GenericModule * | pMod = nullptr |
||
) |
Definition at line 30 of file EffectsProcessor.cpp.
References _log, InventoryItem::AddModifier(), FX::Operands::AGRSM, FX::Operands::AGSM, FX::Operands::AIM, FX::Operands::ALGM, FX::Operands::ALM, FX::Operands::ALRSM, FX::Operands::AORSM, Expression::arg1, Expression::arg2, FX::Operands::ATT, InventoryItem::categoryID(), FX::Operands::COMBINE, FX::Operands::DEFASSOCIATION, FX::Operands::DEFATTRIBUTE, FX::Operands::DEFBOOL, FX::Operands::DEFENVIDX, FX::Operands::DEFGROUP, FX::Operands::DEFINT, FX::Operands::DEFTYPEID, FX::Operands::EFF, Expression::expressionAttributeID, Expression::expressionGroupID, Expression::expressionName, Expression::expressionTypeID, Expression::expressionValue, fxData::fxSrc, FX::Operands::GA, FX::Operands::GET, GetAssociationEnum(), GetEnvironmentEnum(), GetTimeUSeconds(), FX::Operands::GETTYPE, FX::Operands::GM, Inv::Update::Group, fxData::grpID, Acct::Type::IA, EVEDB::invCategories::Implant, Calendar::Flag::Invalid, FX::Operands::LG, fxData::math, Expression::operandID, Profile::parseFX, InventoryItem::RemoveModifier(), FX::Operands::RGGM, FX::Operands::RGORSM, FX::Operands::RGRSM, FX::Operands::RGSM, FX::Operands::RIM, FX::Operands::RLGM, FX::Operands::RLM, FX::Operands::RLRSM, FX::Operands::RORSM, FX::Operands::RSA, sConfig, sFxDataMgr, EVEDB::invCategories::Skill, sProfiler, fxData::srcAttr, fxData::srcRef, FX::Operands::SRLG, fxData::targAttr, fxData::targLoc, fxData::typeID, and InventoryItem::typeID().