Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,209 @@
|
||||
#ifndef _CAGGRESIVE_CREATURE_H_
|
||||
#define _CAGGRESIVE_CREATURE_H_
|
||||
|
||||
#include <Thread/Lock.h>
|
||||
#include <Network/Packet/PacketStruct/CharAttackPacketStruct.h>
|
||||
#include <Creature/Character/CharacterStructure.h>
|
||||
|
||||
#include <Utility/Time/Pulse/Pulse.h>
|
||||
#include <Utility/Setup/ServerSetup.h>
|
||||
|
||||
#include <Skill/SkillStructure.h>
|
||||
#include <Skill/Spell/SpellMgr.h>
|
||||
|
||||
#include "Threat.h"
|
||||
#include "Creature.h"
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CParty;
|
||||
struct TakeType;
|
||||
namespace Skill
|
||||
{
|
||||
class CFunctions;
|
||||
}
|
||||
|
||||
// Creature<72><65> <20>ִ<EFBFBD> Cell<6C><6C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> <20><>ǥ<EFBFBD><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
struct CellPosition
|
||||
{
|
||||
CCell* m_lpCell;
|
||||
|
||||
unsigned short m_wMapIndex;
|
||||
|
||||
unsigned char m_cCellX;
|
||||
unsigned char m_cCellZ;
|
||||
|
||||
unsigned short m_wInX;
|
||||
unsigned short m_wInZ;
|
||||
|
||||
CellPosition();
|
||||
CellPosition(const Position& WorldPos);
|
||||
bool MoveTo(const Position& WorldPos);
|
||||
};
|
||||
|
||||
class CAggresiveCreature : public CCreature
|
||||
{
|
||||
public:
|
||||
|
||||
enum Const
|
||||
{
|
||||
REGEN_TIME = 50, // HP/MP ȸ<><C8B8> <20>ֱ<EFBFBD>
|
||||
MAX_LEVEL_GAP = 20, // <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
AGGRAVATION_NUM = 41, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> (-20 ~ 20)
|
||||
MAX_CASTE = 10 // <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
CAggresiveCreature(unsigned long dwCID);
|
||||
virtual ~CAggresiveCreature();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// <20><>ġ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
const CellPosition& GetCellPos(void) const { return m_CellPos; }
|
||||
void SetMapIndex(unsigned short wMapIndex) { m_CellPos.m_wMapIndex = wMapIndex; }
|
||||
const unsigned short GetMapIndex(void) const { return m_CellPos.m_wMapIndex; }
|
||||
|
||||
float CalcDir2D(const float fSrcX, const float fSrcY, const float fDstX, const float fDstY);
|
||||
|
||||
// <20>̵<EFBFBD> (ũ<><C5A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
MoveInfo MoveTo(const Position& NewPosition, bool bSitDown); // <20>ɾ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bSitMode<64><65> true
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// æƮ/<2F><>æƮ <20><><EFBFBD><EFBFBD>
|
||||
void CalculateEnchantStatus(void)
|
||||
{
|
||||
m_EquipStatus.CalculateEnchantInfo(m_aryEnchantLevel, m_CreatureStatus.m_StatusInfo);
|
||||
}
|
||||
|
||||
void SetEnchantLevel(Skill::SpellID::Type eSpellType, unsigned short wLevel)
|
||||
{
|
||||
m_aryEnchantLevel[eSpellType] = wLevel;
|
||||
}
|
||||
|
||||
unsigned short GetEnchantLevel(Skill::SpellID::Type eSpellType)
|
||||
{
|
||||
return m_aryEnchantLevel[eSpellType];
|
||||
}
|
||||
|
||||
void GetEnchantLevel(unsigned short* wEnchantLevel)
|
||||
{
|
||||
std::copy(&(m_aryEnchantLevel[0]), &(m_aryEnchantLevel[Skill::SpellID::MAX_SPELL_TYPE]), wEnchantLevel);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
virtual const int CalculateFixLevelGap(CAggresiveCreature *pDefender) = 0;
|
||||
const int CalculateLevelGap(CAggresiveCreature *pDefender);
|
||||
const int CalculateLevelGap(int nOffencerLevel, int nDefenderLevel);
|
||||
const float CalculateLevelGapAffect(CAggresiveCreature *pDefender);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
bool MultiAttack(AtType attackType, unsigned char nDefenderNum, CAggresiveCreature** ppDefenders, unsigned char* cDefenserJudges,
|
||||
Position CenterPos, float fDir, float nRange, float fAngle, char cTargetType);
|
||||
|
||||
unsigned short MeleeAttack(CAggresiveCreature* lpTarget, Creature::StatusType eHandType,
|
||||
const float fLevelGap, unsigned char &cDefenserJudge, unsigned int ExType = 0);
|
||||
|
||||
virtual unsigned short ApplyDamage(AtType attackType, CAggresiveCreature* pOffencer, unsigned char &cOffencerJudge,
|
||||
unsigned char &cDefenserJudge, unsigned short& wOffencerMPHeal, unsigned short& wDefenserMPHeal, unsigned short &wError);
|
||||
|
||||
virtual bool CalculateEquipDurability(unsigned short wAttackType) { return true; }
|
||||
|
||||
virtual bool Attack(AtType attackType, unsigned char nDefenderNum, CAggresiveCreature** pDefenders, unsigned char* cDefenserJudges, unsigned short* wDefenserMPHeal) = 0;
|
||||
virtual bool AttackUsingBow(unsigned short wType) { return true; }
|
||||
|
||||
virtual bool RegenHPAndMP(unsigned short usAdditionalHP, unsigned short usAdditionalMP, bool bAddDefaultRegenValue);
|
||||
|
||||
inline virtual bool Dead(CAggresiveCreature* pOffencer);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// <20><>Ÿ Get/Set <20>Լ<EFBFBD>
|
||||
|
||||
void SetParty(CParty* pParty) { m_pParty = pParty; }
|
||||
CParty* GetParty(void) { return m_pParty; }
|
||||
|
||||
CharacterStatus& GetCharStatus(void) { return m_CharacterStatus; }
|
||||
CreatureStatus& GetStatus(void) { return m_CreatureStatus; }
|
||||
|
||||
CThreat& GetThreat(void) { return m_Threat; }
|
||||
|
||||
virtual const FightStatus& GetEtcTypeStatus(Creature::StatusType eType) { return m_EquipStatus; }
|
||||
virtual bool HasSkill(unsigned short usSkillType, unsigned char cLockCount, unsigned char cLevel) { return true; }
|
||||
virtual short GetSkillLockCount(unsigned short usSkillType) { return 0; }
|
||||
|
||||
virtual char GetConsumeMPCount(void) { return 0; }
|
||||
virtual void ConsumeMPCount(void) { }
|
||||
|
||||
virtual unsigned long GetUID(void) const { return 0; }
|
||||
virtual const unsigned long GetFame(void) { return 0; }
|
||||
virtual char GetEliteBonus(void) { return 0; }
|
||||
virtual unsigned short GetClass(void) { return 0; }
|
||||
virtual CAggresiveCreature* GetDuelOpponent(void) { return NULL; }
|
||||
virtual bool IsPeaceMode(void) { return false; }
|
||||
virtual bool IsRideArms(void) const { return false; }
|
||||
virtual unsigned long GetGID(void) const { return 0; }
|
||||
virtual unsigned short GetObjectType() const { return 0; }
|
||||
|
||||
virtual EnemyCheck::EnemyType IsEnemy(CCreature* lpTarget, unsigned char* cResult = NULL) = 0;
|
||||
virtual unsigned char GetNation(void) const = 0;
|
||||
|
||||
virtual void SaveSpell(BOOL bDead = FALSE) { return ; }
|
||||
|
||||
inline CSpellMgr& GetSpellMgr(void) { return m_SpellMgr; }
|
||||
bool IsLogout(void) const { return m_bLogout; }
|
||||
|
||||
virtual bool ItemDump(char* pBuffer, int* nBufferSize_InOut) const { return true; }
|
||||
virtual Item::CItem* SellToCharacter(CCharacter *lpCustomer, unsigned short wKindItem, TakeType takeType,
|
||||
Item::CItem* lpRequestItem, unsigned long &dwPrice, unsigned short wCouponID, unsigned short &usError) = 0;
|
||||
|
||||
virtual unsigned char GetRealmPoint(void) = 0;
|
||||
|
||||
friend class Skill::CFunctions;
|
||||
|
||||
protected:
|
||||
|
||||
unsigned long m_dwLastTime; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ <20>ð<EFBFBD>(<28><><EFBFBD><EFBFBD>/<2F><>Ȱ)
|
||||
|
||||
CParty* m_pParty; // <20><>Ƽ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CThreat m_Threat; // <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>Ʈ
|
||||
|
||||
CharacterStatus m_CharacterStatus; // ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> STR, INT, DEX <20><><EFBFBD><EFBFBD> <20>ɷ<EFBFBD>ġ
|
||||
CreatureStatus m_CreatureStatus; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ɷ<EFBFBD>ġ
|
||||
|
||||
FightStatus m_EquipStatus; // <20>⺻ <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ɷ<EFBFBD>ġ
|
||||
|
||||
CSpellMgr m_SpellMgr;
|
||||
unsigned short m_aryEnchantLevel[Skill::SpellID::MAX_SPELL_TYPE];
|
||||
|
||||
CellPosition m_CellPos; // <20><> <20><>ġ
|
||||
|
||||
bool m_bLogout;
|
||||
bool m_bSitDown;
|
||||
bool m_bPadding[2];
|
||||
|
||||
unsigned short CalculateDamage(const FightStatus& OffencerStatusInfo, const float fLevelGap, unsigned char &cDefenserJudge, unsigned int ExType = 0);
|
||||
};
|
||||
|
||||
|
||||
inline bool CAggresiveCreature::Dead(CAggresiveCreature* pOffencer)
|
||||
{
|
||||
m_dwLastTime = CPulse::GetInstance().GetLastTick();
|
||||
|
||||
// Enchant<6E><74> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>.
|
||||
m_SpellMgr.GetAffectedInfo().Disenchant(Skill::SpellType::NONE,
|
||||
Skill::SpellTarget::ALL_ENCHANT, Skill::Disenchant::NONE, 1, Skill::Disenchant::INFINITE_NUM);
|
||||
m_SpellMgr.GetAffectedInfo().Disenchant(Skill::SpellType::ETERNAL_SPELL,
|
||||
Skill::SpellTarget::ALL_ENCHANT, Skill::Disenchant::NONE, 1, Skill::Disenchant::INFINITE_NUM);
|
||||
m_SpellMgr.GetCastingInfo().ClearEnchant();
|
||||
|
||||
// Chant<6E><74>, <20><><EFBFBD><EFBFBD> <20><> <20><>ų<EFBFBD><C5B3> Disable<6C>Ѵ<EFBFBD>. ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD> Disable<6C><65> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD>. )
|
||||
m_SpellMgr.GetCastingInfo().ClearChant();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user