Moin,
Da ich oft Anfragen bekomme, wo welche Funktion zu finden ist, habe ich mir überlegt, eine Übersicht zu erstellen.
Aktuell bin ich bei dem Buchstaben D. (Der Rest folgt noch)
Der Sinn dieser Aufzählung ist die Suche nach Begriffen und Funktionen.
Ihr wollt z.B. wissen was es alles für Funktionen für das Pferd gibt und wo die stehen ? Suche nach "horse".
Ich lade die Daten auch als .txt hoch, da kann man besser suchen.
Code
- affect.h
- class CAffect
- DWORD dwType;
- BYTE bApplyOn;
- long lApplyValue;
- DWORD dwFlag;
- long lDuration;
- long lSPCost;
- static CAffect* Acquire();
- static void Release(CAffect* p);
- enum EAffectTypes
- AFFECT_NONE,
- AFFECT_MOV_SPEED = 200,
- AFFECT_ATT_SPEED,
- AFFECT_ATT_GRADE,
- AFFECT_INVISIBILITY,
- AFFECT_STR,
- AFFECT_DEX, // 205
- AFFECT_CON,
- AFFECT_INT,
- AFFECT_FISH_MIND_PILL,
- AFFECT_POISON,
- AFFECT_STUN, // 210
- AFFECT_SLOW,
- AFFECT_DUNGEON_READY,
- AFFECT_DUNGEON_UNIQUE,
- AFFECT_BUILDING,
- AFFECT_REVIVE_INVISIBLE, // 215
- AFFECT_FIRE,
- AFFECT_CAST_SPEED,
- AFFECT_HP_RECOVER_CONTINUE,
- AFFECT_SP_RECOVER_CONTINUE,
- AFFECT_POLYMORPH, // 220
- AFFECT_MOUNT,
- AFFECT_WAR_FLAG, // 222
- AFFECT_BLOCK_CHAT, // 223
- AFFECT_CHINA_FIREWORK,
- AFFECT_BOW_DISTANCE, // 225
- AFFECT_DEF_GRADE, // 226
- AFFECT_PREMIUM_START = 500,
- AFFECT_EXP_BONUS = 500,
- AFFECT_ITEM_BONUS = 501,
- AFFECT_SAFEBOX = 502, // PREMIUM_SAFEBOX,
- AFFECT_AUTOLOOT = 503, // PREMIUM_AUTOLOOT,
- AFFECT_FISH_MIND = 504, // PREMIUM_FISH_MIND,
- AFFECT_MARRIAGE_FAST = 505,
- AFFECT_GOLD_BONUS = 506,
- AFFECT_PREMIUM_END = 509,
- AFFECT_MALL = 510,
- AFFECT_NO_DEATH_PENALTY = 511,
- AFFECT_SKILL_BOOK_BONUS = 512,
- AFFECT_SKILL_NO_BOOK_DELAY = 513,
- AFFECT_HAIR = 514,
- AFFECT_COLLECT = 515,
- AFFECT_EXP_BONUS_EURO_FREE = 516,
- AFFECT_EXP_BONUS_EURO_FREE_UNDER_15 = 517,
- AFFECT_UNIQUE_ABILITY = 518,
- AFFECT_CUBE_1,
- AFFECT_CUBE_2,
- AFFECT_CUBE_3,
- AFFECT_CUBE_4,
- AFFECT_CUBE_5,
- AFFECT_CUBE_6,
- AFFECT_CUBE_7,
- AFFECT_CUBE_8,
- AFFECT_CUBE_9,
- AFFECT_CUBE_10,
- AFFECT_CUBE_11,
- AFFECT_CUBE_12,
- AFFECT_BLEND,
- AFFECT_HORSE_NAME,
- AFFECT_MOUNT_BONUS,
- AFFECT_AUTO_HP_RECOVERY = 534,
- AFFECT_AUTO_SP_RECOVERY = 535,
- AFFECT_DRAGON_SOUL_QUALIFIED = 540,
- AFFECT_DRAGON_SOUL_DECK_0 = 541,
- AFFECT_DRAGON_SOUL_DECK_1 = 542,
- AFFECT_RAMADAN_ABILITY = 300,
- AFFECT_RAMADAN_RING = 301,
- AFFECT_NOG_ABILITY = 302,
- AFFECT_HOLLY_STONE_POWER = 303,
- AFFECT_QUEST_START_IDX = 1000
- enum EAffectBits
- AFF_NONE,
- AFF_YMIR,
- AFF_INVISIBILITY,
- AFF_SPAWN,
- AFF_POISON,
- AFF_SLOW,
- AFF_STUN,
- AFF_DUNGEON_READY,
- AFF_DUNGEON_UNIQUE,
- AFF_BUILDING_CONSTRUCTION_SMALL,
- AFF_BUILDING_CONSTRUCTION_LARGE,
- AFF_BUILDING_UPGRADE,
- AFF_MOV_SPEED_POTION,
- AFF_ATT_SPEED_POTION,
- AFF_FISH_MIND,
- AFF_JEONGWIHON,
- AFF_GEOMGYEONG,
- AFF_CHEONGEUN,
- AFF_GYEONGGONG,
- AFF_EUNHYUNG,
- AFF_GWIGUM,
- AFF_TERROR,
- AFF_JUMAGAP,
- AFF_HOSIN,
- AFF_BOHO,
- AFF_KWAESOK,
- AFF_MANASHIELD,
- AFF_MUYEONG,
- AFF_REVIVE_INVISIBLE,
- AFF_FIRE,
- AFF_GICHEON,
- AFF_JEUNGRYEOK,
- AFF_TANHWAN_DASH,
- AFF_PABEOP,
- AFF_CHEONGEUN_WITH_FALL,
- AFF_POLYMORPH,
- AFF_WAR_FLAG1,
- AFF_WAR_FLAG2,
- AFF_WAR_FLAG3,
- AFF_CHINA_FIREWORK,
- AFF_HAIR,
- AFF_GERMANY,
- AFF_BITS_MAX
- void SendAffectAddPacket(LPDESC d, CAffect * pkAff)
- enum AffectVariable
- INFINITE_AFFECT_DURATION = 60 * 365 * 24 * 60 * 60
- affect_flag.h
- struct TAffectFlag
- TAffectFlag
- bool IsSet(int flag)
- void Set(int flag)
- void Reset(int flag)
- TAffectFlag& operator = (const TAffectFlag& rhs)
- ani.h
- void ani_init();
- DWORD ani_attack_speed(LPCHARACTER ch);
- void ani_print_attack_speed();
- DWORD ani_combo_speed(LPCHARACTER ch, BYTE combo);
- any_function.h
- class void_binder
- F f;
- typename F::argument_type value;
- void_binder(const F& f, const typename F::argument_type x) : f(f), value(x) {}
- void operator()() const {return f(value);}
- void_binder<F> void_bind(const F& f, const Arg& arg)
- arena.h
- enum MEMBER_IDENTITY
- MEMBER_NO,
- MEMBER_DUELIST,
- MEMBER_OBSERVER,
- MEMBER_MAX
- class CArena
- DWORD m_dwPIDA;
- DWORD m_dwPIDB;
- LPEVENT m_pEvent;
- LPEVENT m_pTimeOutEvent;
- PIXEL_POSITION m_StartPointA;
- PIXEL_POSITION m_StartPointB;
- PIXEL_POSITION m_ObserverPoint;
- DWORD m_dwSetCount;
- DWORD m_dwSetPointOfA;
- DWORD m_dwSetPointOfB;
- std::map<DWORD, LPCHARACTER> m_mapObserver;
- CArena(WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y);
- bool StartDuel(LPCHARACTER pCharFrom, LPCHARACTER pCharTo, int nSetPoint, int nMinute = 5);
- bool IsEmpty() const { return ((m_dwPIDA==0) && (m_dwPIDB==0)); }
- bool IsMember(DWORD dwPID) const { return ((m_dwPIDA==dwPID) || (m_dwPIDB==dwPID)); }
- bool CheckArea(WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y);
- void Clear();
- bool CanAttack(DWORD dwPIDA, DWORD dwPIDB);
- bool OnDead(DWORD dwPIDA, DWORD dwPIDB);
- bool IsObserver(DWORD pid);
- bool IsMyObserver(WORD ObserverX, WORD ObserverY);
- bool AddObserver(LPCHARACTER pChar);
- bool RegisterObserverPtr(LPCHARACTER pChar);
- DWORD GetPlayerAPID() { return m_dwPIDA; }
- DWORD GetPlayerBPID() { return m_dwPIDB; }
- LPCHARACTER GetPlayerA() { return CHARACTER_MANAGER::instance().FindByPID(m_dwPIDA); }
- LPCHARACTER GetPlayerB() { return CHARACTER_MANAGER::instance().FindByPID(m_dwPIDB); }
- PIXEL_POSITION GetStartPointA() { return m_StartPointA; }
- PIXEL_POSITION GetStartPointB() { return m_StartPointB; }
- PIXEL_POSITION GetObserverPoint() { return m_ObserverPoint; }
- void EndDuel();
- void ClearEvent() { m_pEvent = NULL; }
- void OnDisconnect(DWORD pid);
- void RemoveObserver(DWORD pid);
- void SendPacketToObserver(const void * c_pvData, int iSize);
- void SendChatPacketToObserver(BYTE type, const char * format, ...);
- class CArenaMap
- DWORD m_dwMapIndex;
- std::list<CArena*> m_listArena;
- void Destroy();
- bool AddArena(DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y);
- void SendArenaMapListTo(LPCHARACTER pChar, DWORD dwMapIndex);
- bool StartDuel(LPCHARACTER pCharFrom, LPCHARACTER pCharTo, int nSetPoint, int nMinute = 5);
- void EndAllDuel();
- bool EndDuel(DWORD pid);
- int GetDuelList(lua_State* L, int index);
- bool CanAttack(LPCHARACTER pCharAttacker, LPCHARACTER pCharVictim);
- bool OnDead(LPCHARACTER pCharKiller, LPCHARACTER pCharVictim);
- bool AddObserver(LPCHARACTER pChar, WORD ObserverX, WORD ObserverY);
- bool RegisterObserverPtr(LPCHARACTER pChar, DWORD mapIdx, WORD ObserverX, WORD ObserverY);
- MEMBER_IDENTITY IsMember(DWORD PID);
- class CArenaManager : public singleton<CArenaManager>
- std::map<DWORD, CArenaMap*> m_mapArenaMap;
- bool Initialize();
- void Destroy();
- bool StartDuel(LPCHARACTER pCharFrom, LPCHARACTER pCharTo, int nSetPoint, int nMinute = 5);
- bool AddArena(DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y);
- void SendArenaMapListTo(LPCHARACTER pChar);
- void EndAllDuel();
- bool EndDuel(DWORD pid);
- void GetDuelList(lua_State* L);
- bool CanAttack(LPCHARACTER pCharAttacker, LPCHARACTER pCharVictim);
- bool OnDead(LPCHARACTER pCharKiller, LPCHARACTER pCharVictim);
- bool AddObserver(LPCHARACTER pChar, DWORD mapIdx, WORD ObserverX, WORD ObserverY);
- bool RegisterObserverPtr(LPCHARACTER pChar, DWORD mapIdx, WORD ObserverX, WORD ObserverY);
- bool IsArenaMap(DWORD dwMapIndex);
- MEMBER_IDENTITY IsMember(DWORD dwMapIndex, DWORD PID);
- bool IsLimitedItem( long lMapIndex, DWORD dwVnum );
- banword.h
- class CBanwordManager : public singleton<CBanwordManager>
- CBanwordManager();
- virtual ~CBanwordManager();
- bool Initialize(TBanwordTable * p, WORD wSize);
- bool Find(const char * c_pszString);
- bool CheckString(const char * c_pszString, size_t _len);
- void ConvertString(char * c_pszString, size_t _len);
- boost::unordered_map<std::string, bool> TBanwordHashmap;
- TBanwordHashmap m_hashmap_words;
- battle.h
- enum EBattleTypes
- BATTLE_NONE,
- BATTLE_DAMAGE,
- BATTLE_DEFENSE,
- BATTLE_DEAD
- int CalcAttBonus(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int iAtk);
- int CalcBattleDamage(int iDam, int iAttackerLev, int iVictimLev);
- int CalcMeleeDamage(LPCHARACTER pAttacker, LPCHARACTER pVictim, bool bIgnoreDefense = false, bool bIgnoreTargetRating = false);
- int CalcMagicDamage(LPCHARACTER pAttacker, LPCHARACTER pVictim);
- int CalcArrowDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, LPITEM pkBow, LPITEM pkArrow, bool bIgnoreDefense = false);
- float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating = false);
- bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim);
- int battle_melee_attack(LPCHARACTER ch, LPCHARACTER victim);
- void battle_end(LPCHARACTER ch);
- bool battle_distance_valid_by_xy(long x, long y, long tx, long ty);
- bool battle_distance_valid(LPCHARACTER ch, LPCHARACTER victim);
- int battle_count_attackers(LPCHARACTER ch);
- void NormalAttackAffect(LPCHARACTER pkAttacker, LPCHARACTER pkVictim);
- void AttackAffect(LPCHARACTER pkAttacker,LPCHARACTER pkVictim,BYTE att_point,DWORD immune_flag,DWORD affect_idx,BYTE affect_point,long affect_amount,DWORD affect_flag,int time,const char* name)
- void SkillAttackAffect(LPCHARACTER pkVictim,int success_pct,DWORD immune_flag,DWORD affect_idx,BYTE affect_point,long affect_amount,DWORD affect_flag,int time,const char* name)
- DWORD GET_ATTACK_SPEED(LPCHARACTER ch);
- void SET_ATTACK_TIME(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time);
- void SET_ATTACKED_TIME(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time);
- bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time);
- BattleArena.h
- int nBATTLE_ARENA_MAP[]
- std::string strRegen[]
- enum BATTLEARENA_STATUS
- STATUS_CLOSE = 0,
- STATUS_BATTLE,
- STATUS_END,
- class CBattleArena : public singleton<CBattleArena>
- LPEVENT m_pEvent;
- BATTLEARENA_STATUS m_status;
- int m_nMapIndex;
- int m_nEmpire;
- bool m_bForceEnd;
- CBattleArena();
- bool IsBattleArenaMap(int nMapIndex);
- bool IsRunning();
- void SetStatus(BATTLEARENA_STATUS status);
- bool Start(int nEmpire);
- void ForceEnd();
- void End();
- void SpawnLastBoss();
- void SpawnRandomStone();
- belt_inventory_helper.h
- class CBeltInventoryHelper
- BYTE TGradeUnit;
- TGradeUnit GetBeltGradeByRefineLevel(int level)
- TGradeUnit beltGradeByLevelTable[]
- const TGradeUnit* GetAvailableRuleTableByGrade()
- TGradeUnit availableRuleByGrade[BELT_INVENTORY_SLOT_COUNT]
- bool IsAvailableCell(WORD cell, int beltGrade)
- bool IsExistItemInBeltInventory(LPCHARACTER pc)
- bool CanMoveIntoBeltInventory(LPITEM item)
- blend_item.h
- bool Blend_Item_init();
- bool Blend_Item_load(char *file);
- bool Blend_Item_set_value(LPITEM item);
- bool Blend_Item_find(DWORD item_vnum);
- BlueDragon.h
- int BlueDragon_StateBattle (LPCHARACTER);
- time_t UseBlueDragonSkill (LPCHARACTER, unsigned int);
- int BlueDragon_Damage (LPCHARACTER me, LPCHARACTER attacker, int dam);
- BlueDragon_Binder.h
- enum BLUEDRAGON_STONE_EFFECT
- DEF_BONUS = 1,
- ATK_BONUS = 2,
- REGEN_TIME_BONUS = 3,
- REGEN_PECT_BONUS = 4,
- unsigned int BlueDragon_GetRangeFactor (const char* key, const int val);
- unsigned int BlueDragon_GetSkillFactor (const size_t cnt, ...);
- unsigned int BlueDragon_GetIndexFactor (const char* container, const size_t idx, const char* key);
- BlueDragon_Skill.h
- struct FSkillBreath
- struct FSkillWeakBreath
- struct FSkillEarthQuake
- buff_on_attributes.h
- class CBuffOnAttributes
- CBuffOnAttributes(LPCHARACTER pOwner, BYTE m_point_type, std::vector <BYTE>* vec_buff_targets);
- void RemoveBuffFromItem(LPITEM pItem);
- void AddBuffFromItem(LPITEM pItem);
- void ChangeBuffValue(BYTE bNewValue);
- void GiveAllAttributes();
- bool On(BYTE bValue);
- void Off();
- void Initialize();
- LPCHARACTER m_pBuffOwner;
- BYTE m_bPointType;
- BYTE m_bBuffValue;
- std::vector <BYTE>* m_p_vec_buff_wear_targets;
- std::map <BYTE, int> TMapAttr;
- TMapAttr m_map_additional_attrs;
- buffer_manager.h
- class TEMP_BUFFER
- TEMP_BUFFER(int Size = 8192, bool ForceDelete = false );
- const void * read_peek();
- void write(const void * data, int size);
- int size();
- void reset();
- LPBUFFER getptr() { return buf; }
- LPBUFFER buf;
- bool forceDelete;
- building.h
- class CLand;
- class CObject : public CEntity
- CObject(TObject * pData, TObjectProto * pProto);
- void Destroy();
- virtual void EncodeInsertPacket(LPENTITY entity);
- virtual void EncodeRemovePacket(LPENTITY entity);
- DWORD GetID() { return m_data.dwID; }
- void SetVID(DWORD dwVID);
- DWORD GetVID() { return m_dwVID; }
- bool Show(long lMapIndex, long x, long y);
- void Save();
- void SetLand(CLand * pkLand) { m_pkLand = pkLand; }
- CLand * GetLand() { return m_pkLand; }
- DWORD GetVnum() { return m_pProto ? m_pProto->dwVnum : 0; }
- DWORD GetGroup() { return m_pProto ? m_pProto->dwGroupVnum : 0; }
- void RegenNPC();
- void ApplySpecialEffect();
- void RemoveSpecialEffect();
- void Reconstruct(DWORD dwVnum);
- LPCHARACTER GetNPC() { return m_chNPC; }
- TObjectProto * m_pProto;
- TObject m_data;
- DWORD m_dwVID;
- CLand * m_pkLand;
- LPCHARACTER m_chNPC;
- class CLand
- CLand(TLand * pData);
- void Destroy();
- const TLand & GetData();
- void PutData(const TLand * data);
- DWORD GetID() const { return m_data.dwID; }
- void SetOwner(DWORD dwGID);
- DWORD GetOwner() const { return m_data.dwGuildID; }
- void InsertObject(LPOBJECT pkObj);
- LPOBJECT FindObject(DWORD dwID);
- LPOBJECT FindObjectByVID(DWORD dwVID);
- LPOBJECT FindObjectByVnum(DWORD dwVnum);
- LPOBJECT FindObjectByGroup(DWORD dwGroupVnum);
- LPOBJECT FindObjectByNPC(LPCHARACTER npc);
- void DeleteObject(DWORD dwID);
- bool RequestCreateObject(DWORD dwVnum, long lMapIndex, long x, long y, float xRot, float yRot, float zRot, bool checkAnother);
- void RequestDeleteObject(DWORD dwID);
- void RequestDeleteObjectByVID(DWORD dwVID);
- void RequestUpdate(DWORD dwGuild);
- void ClearLand();
- bool RequestCreateWall(long nMapIndex, float rot);
- void RequestDeleteWall();
- bool RequestCreateWallBlocks(DWORD dwVnum, long nMapIndex, char wallSize, bool doorEast, bool doorWest, bool doorSouth, bool doorNorth);
- void RequestDeleteWallBlocks(DWORD dwVnum);
- DWORD GetMapIndex() { return m_data.lMapIndex; }
- TLand m_data;
- std::map<DWORD, LPOBJECT> m_map_pkObject;
- std::map<DWORD, LPOBJECT> m_map_pkObjectByVID;
- void DrawWall(DWORD dwVnum, long nMapIndex, long& centerX, long& centerY, char length, float zRot);
- class CManager : public singleton<CManager>
- CManager();
- void Destroy();
- void FinalizeBoot();
- bool LoadObjectProto(const TObjectProto * pProto, int size);
- TObjectProto * GetObjectProto(DWORD dwVnum);
- bool LoadLand(TLand * pTable);
- CLand * FindLand(DWORD dwID);
- CLand * FindLand(long lMapIndex, long x, long y);
- CLand * FindLandByGuild(DWORD GID);
- void UpdateLand(TLand * pTable);
- bool LoadObject(TObject * pTable, bool isBoot=false);
- void DeleteObject(DWORD dwID);
- void UnregisterObject(LPOBJECT pkObj);
- LPOBJECT FindObjectByVID(DWORD dwVID);
- void SendLandList(LPDESC d, long lMapIndex);
- void ClearLand(DWORD dwLandID);
- void ClearLandByGuildID(DWORD dwGuildID);
- std::vector<TObjectProto> m_vec_kObjectProto;
- std::map<DWORD, TObjectProto *> m_map_pkObjectProto;
- std::map<DWORD, CLand *> m_map_pkLand;
- std::map<DWORD, LPOBJECT> m_map_pkObjByID;
- std::map<DWORD, LPOBJECT> m_map_pkObjByVID;
- castle.h
- enum CASTLE_STATE
- CASTLE_SIEGE_NONE,
- CASTLE_SIEGE_STRUGGLE,
- CASTLE_SIEGE_END
- struct CASTLE_DATA
- LPCHARACTER frog[MAX_CASTLE_FROG];
- LPCHARACTER guard[MAX_CASTLE_GUARD_REGION][MAX_CASTLE_GUARD_PER_REGION];
- DWORD guard_group[MAX_CASTLE_GUARD_REGION][MAX_CASTLE_GUARD_PER_REGION];
- LPCHARACTER tower[MAX_CASTLE_TOWER];
- LPEVENT siege_event;
- LPEVENT stone_event;
- bool castle_boot();
- void castle_save();
- int castle_siege(int empire, int tower_count);
- void castle_start_siege(int empire, int tower_count);
- void castle_end_siege();
- LPCHARACTER castle_spawn_frog(int empire);
- LPCHARACTER castle_spawn_guard(int empire, DWORD group_vnum, int region_index);
- bool castle_spawn_tower(int empire, int tower_count);
- void castle_guard_die(LPCHARACTER ch, LPCHARACTER killer);
- void castle_frog_die(LPCHARACTER ch, LPCHARACTER killer);
- void castle_tower_die(LPCHARACTER ch, LPCHARACTER killer);
- int castle_guard_count(int empire, int region_index);
- int castle_frog_count(int empire);
- bool castle_is_guard_vnum(DWORD vnum);
- int castle_cost_of_hiring_guard(DWORD vnum);
- bool castle_can_attack(LPCHARACTER ch, LPCHARACTER victim);
- bool castle_frog_to_empire_money(LPCHARACTER ch);
- bool castle_is_my_castle(int empire, int map_index);
- bool castle_is_tower_vnum(DWORD vnum);
- char.h
- class CBuffOnAttributes;
- class CPetSystem;
- enum
- MAIN_RACE_WARRIOR_M,MAIN_RACE_ASSASSIN_W,
- MAIN_RACE_SURA_M,MAIN_RACE_SHAMAN_W,
- MAIN_RACE_WARRIOR_W,MAIN_RACE_ASSASSIN_M,
- MAIN_RACE_SURA_W,MAIN_RACE_SHAMAN_M,
- MAIN_RACE_MAX_NUM,
- enum
- POISON_LENGTH = 30,STAMINA_PER_STEP = 1,
- SAFEBOX_PAGE_SIZE = 9,AI_CHANGE_ATTACK_POISITION_TIME_NEAR = 10000,
- AI_CHANGE_ATTACK_POISITION_TIME_FAR = 1000,AI_CHANGE_ATTACK_POISITION_DISTANCE = 100,
- SUMMON_MONSTER_COUNT = 3,
- enum
- FLY_NONE,FLY_EXP,
- FLY_HP_MEDIUM,FLY_HP_BIG,
- FLY_SP_SMALL,FLY_SP_MEDIUM,FLY_SP_BIG,
- FLY_FIREWORK1,FLY_FIREWORK2,FLY_FIREWORK3,FLY_FIREWORK4,FLY_FIREWORK5,FLY_FIREWORK6,FLY_FIREWORK_CHRISTMAS,
- FLY_CHAIN_LIGHTNING,FLY_HP_SMALL,FLY_SKILL_MUYEONG,
- enum EDamageType
- DAMAGE_TYPE_NONE,
- DAMAGE_TYPE_NORMAL,
- DAMAGE_TYPE_NORMAL_RANGE,
- DAMAGE_TYPE_MELEE,
- DAMAGE_TYPE_RANGE,
- DAMAGE_TYPE_FIRE,
- DAMAGE_TYPE_ICE,
- DAMAGE_TYPE_ELEC,
- DAMAGE_TYPE_MAGIC,
- DAMAGE_TYPE_POISON,
- DAMAGE_TYPE_SPECIAL,
- enum EPointTypes
- POINT_NONE, // 0
- POINT_LEVEL, // 1
- POINT_VOICE, // 2
- POINT_EXP, // 3
- POINT_NEXT_EXP, // 4
- POINT_HP, // 5
- POINT_MAX_HP, // 6
- POINT_SP, // 7
- POINT_MAX_SP, // 8
- POINT_STAMINA, // 9
- POINT_MAX_STAMINA, // 10
- POINT_GOLD, // 11
- POINT_ST, // 12
- POINT_HT, // 13
- POINT_DX, // 14
- POINT_IQ, // 15
- POINT_DEF_GRADE, // 16
- POINT_ATT_SPEED, // 17
- POINT_ATT_GRADE, // 18
- POINT_MOV_SPEED, // 19
- POINT_CLIENT_DEF_GRADE, // 20 방어등급
- POINT_CASTING_SPEED, // 21 주문속도 (쿨다운타임*100) / (100 + 이값) = 최종 쿨다운 타임
- POINT_MAGIC_ATT_GRADE, // 22 마법공격력
- POINT_MAGIC_DEF_GRADE, // 23 마법방어력
- POINT_EMPIRE_POINT, // 24 제국점수
- POINT_LEVEL_STEP, // 25 한 레벨에서의 단계.. (1 2 3 될 때 보상, 4 되면 레벨 업)
- POINT_STAT, // 26 능력치 올릴 수 있는 개수
- POINT_SUB_SKILL, // 27 보조 스킬 포인트
- POINT_SKILL, // 28 액티브 스킬 포인트
- POINT_WEAPON_MIN, // 29 무기 최소 데미지
- POINT_WEAPON_MAX, // 30 무기 최대 데미지
- POINT_PLAYTIME, // 31 플레이시간
- POINT_HP_REGEN, // 32 HP 회복률
- POINT_SP_REGEN, // 33 SP 회복률
- POINT_BOW_DISTANCE, // 34 활 사정거리 증가치 (meter)
- POINT_HP_RECOVERY, // 35 체력 회복 증가량
- POINT_SP_RECOVERY, // 36 정신력 회복 증가량
- POINT_POISON_PCT, // 37 독 확률
- POINT_STUN_PCT, // 38 기절 확률
- POINT_SLOW_PCT, // 39 슬로우 확률
- POINT_CRITICAL_PCT, // 40 크리티컬 확률
- POINT_PENETRATE_PCT, // 41 관통타격 확률
- POINT_CURSE_PCT, // 42 저주 확률
- POINT_ATTBONUS_HUMAN, // 43 인간에게 강함
- POINT_ATTBONUS_ANIMAL, // 44 동물에게 데미지 % 증가
- POINT_ATTBONUS_ORC, // 45 웅귀에게 데미지 % 증가
- POINT_ATTBONUS_MILGYO, // 46 밀교에게 데미지 % 증가
- POINT_ATTBONUS_UNDEAD, // 47 시체에게 데미지 % 증가
- POINT_ATTBONUS_DEVIL, // 48 마귀(악마)에게 데미지 % 증가
- POINT_ATTBONUS_INSECT, // 49 벌레족
- POINT_ATTBONUS_FIRE, // 50 화염족
- POINT_ATTBONUS_ICE, // 51 빙설족
- POINT_ATTBONUS_DESERT, // 52 사막족
- POINT_ATTBONUS_MONSTER, // 53 모든 몬스터에게 강함
- POINT_ATTBONUS_WARRIOR, // 54 무사에게 강함
- POINT_ATTBONUS_ASSASSIN, // 55 자객에게 강함
- POINT_ATTBONUS_SURA, // 56 수라에게 강함
- POINT_ATTBONUS_SHAMAN, // 57 무당에게 강함
- POINT_ATTBONUS_TREE, // 58 나무에게 강함 20050729.myevan UNUSED5
- POINT_RESIST_WARRIOR, // 59 무사에게 저항
- POINT_RESIST_ASSASSIN, // 60 자객에게 저항
- POINT_RESIST_SURA, // 61 수라에게 저항
- POINT_RESIST_SHAMAN, // 62 무당에게 저항
- POINT_STEAL_HP, // 63 생명력 흡수
- POINT_STEAL_SP, // 64 정신력 흡수
- POINT_MANA_BURN_PCT, // 65 마나 번
- POINT_DAMAGE_SP_RECOVER, // 66 공격당할 시 정신력 회복 확률
- POINT_BLOCK, // 67 블럭율
- POINT_DODGE, // 68 회피율
- POINT_RESIST_SWORD, // 69
- POINT_RESIST_TWOHAND, // 70
- POINT_RESIST_DAGGER, // 71
- POINT_RESIST_BELL, // 72
- POINT_RESIST_FAN, // 73
- POINT_RESIST_BOW, // 74 화살 저항 : 대미지 감소
- POINT_RESIST_FIRE, // 75 화염 저항 : 화염공격에 대한 대미지 감소
- POINT_RESIST_ELEC, // 76 전기 저항 : 전기공격에 대한 대미지 감소
- POINT_RESIST_MAGIC, // 77 술법 저항 : 모든술법에 대한 대미지 감소
- POINT_RESIST_WIND, // 78 바람 저항 : 바람공격에 대한 대미지 감소
- POINT_REFLECT_MELEE, // 79 공격 반사
- POINT_REFLECT_CURSE, // 80 저주 반사
- POINT_POISON_REDUCE, // 81 독데미지 감소
- POINT_KILL_SP_RECOVER, // 82 적 소멸시 MP 회복
- POINT_EXP_DOUBLE_BONUS, // 83
- POINT_GOLD_DOUBLE_BONUS, // 84
- POINT_ITEM_DROP_BONUS, // 85
- POINT_POTION_BONUS, // 86
- POINT_KILL_HP_RECOVERY, // 87
- POINT_IMMUNE_STUN, // 88
- POINT_IMMUNE_SLOW, // 89
- POINT_IMMUNE_FALL, // 90
- POINT_PARTY_ATTACKER_BONUS, // 91
- POINT_PARTY_TANKER_BONUS, // 92
- POINT_ATT_BONUS, // 93
- POINT_DEF_BONUS, // 94
- POINT_ATT_GRADE_BONUS, // 95
- POINT_DEF_GRADE_BONUS, // 96
- POINT_MAGIC_ATT_GRADE_BONUS, // 97
- POINT_MAGIC_DEF_GRADE_BONUS, // 98
- POINT_RESIST_NORMAL_DAMAGE, // 99
- POINT_HIT_HP_RECOVERY, // 100
- POINT_HIT_SP_RECOVERY, // 101
- POINT_MANASHIELD, // 102 흑신수호 스킬에 의한 마나쉴드 효과 정도
- POINT_PARTY_BUFFER_BONUS, // 103
- POINT_PARTY_SKILL_MASTER_BONUS, // 104
- POINT_HP_RECOVER_CONTINUE, // 105
- POINT_SP_RECOVER_CONTINUE, // 106
- POINT_STEAL_GOLD, // 107
- POINT_POLYMORPH, // 108 변신한 몬스터 번호
- POINT_MOUNT, // 109 타고있는 몬스터 번호
- POINT_PARTY_HASTE_BONUS, // 110
- POINT_PARTY_DEFENDER_BONUS, // 111
- POINT_STAT_RESET_COUNT, // 112 피의 단약 사용을 통한 스텟 리셋 포인트 (1당 1포인트 리셋가능)
- POINT_HORSE_SKILL, // 113
- POINT_MALL_ATTBONUS, // 114 공격력 +x%
- POINT_MALL_DEFBONUS, // 115 방어력 +x%
- POINT_MALL_EXPBONUS, // 116 경험치 +x%
- POINT_MALL_ITEMBONUS, // 117 아이템 드롭율 x/10배
- POINT_MALL_GOLDBONUS, // 118 돈 드롭율 x/10배
- POINT_MAX_HP_PCT, // 119 최대생명력 +x%
- POINT_MAX_SP_PCT, // 120 최대정신력 +x%
- POINT_SKILL_DAMAGE_BONUS, // 121 스킬 데미지 *(100+x)%
- POINT_NORMAL_HIT_DAMAGE_BONUS, // 122 평타 데미지 *(100+x)%
- POINT_SKILL_DEFEND_BONUS, // 123 스킬 방어 데미지
- POINT_NORMAL_HIT_DEFEND_BONUS, // 124 평타 방어 데미지
- POINT_PC_BANG_EXP_BONUS, // 125 PC방 전용 경험치 보너스
- POINT_PC_BANG_DROP_BONUS, // 126 PC방 전용 드롭률 보너스
- POINT_RAMADAN_CANDY_BONUS_EXP, // 라마단 사탕 경험치 증가용
- POINT_ENERGY = 128, // 128 기력
- POINT_ENERGY_END_TIME = 129, // 129 기력 종료 시간
- POINT_COSTUME_ATTR_BONUS = 130,
- POINT_MAGIC_ATT_BONUS_PER = 131,
- POINT_MELEE_MAGIC_ATT_BONUS_PER = 132,
- POINT_RESIST_ICE = 133, // 냉기 저항 : 얼음공격에 대한 대미지 감소
- POINT_RESIST_EARTH = 134, // 대지 저항 : 얼음공격에 대한 대미지 감소
- POINT_RESIST_DARK = 135, // 어둠 저항 : 얼음공격에 대한 대미지 감소
- POINT_RESIST_CRITICAL = 136, // 크리티컬 저항 : 상대의 크리티컬 확률을 감소
- POINT_RESIST_PENETRATE = 137, // 관통타격 저항 : 상대의 관통타격 확률을 감소
- enum EPKModes
- PK_MODE_PEACE,
- PK_MODE_REVENGE,
- PK_MODE_FREE,
- PK_MODE_PROTECT,
- PK_MODE_GUILD,
- PK_MODE_MAX_NUM
- enum EPositions
- POS_DEAD,
- POS_SLEEPING,
- POS_RESTING,
- POS_SITTING,
- POS_FISHING,
- POS_FIGHTING,
- POS_MOUNTING,
- POS_STANDING
- enum EBlockAction
- BLOCK_EXCHANGE = (1 << 0),
- BLOCK_PARTY_INVITE = (1 << 1),
- BLOCK_GUILD_INVITE = (1 << 2),
- BLOCK_WHISPER = (1 << 3),
- BLOCK_MESSENGER_INVITE = (1 << 4),
- BLOCK_PARTY_REQUEST = (1 << 5),
- struct DynamicCharacterPtr
- struct character_point
- long points[POINT_MAX_NUM];
- BYTE job;
- BYTE voice;
- BYTE level;
- DWORD exp;
- long gold;
- int hp;
- int sp;
- int iRandomHP;
- int iRandomSP;
- int stamina;
- BYTE skill_group;
- struct character_point_instant
- long points[POINT_MAX_NUM];
- float fRot;
- int iMaxHP;
- int iMaxSP;
- long position;
- long instant_flag;
- DWORD dwAIFlag;
- DWORD dwImmuneFlag;
- DWORD dwLastShoutPulse;
- WORD parts[PART_MAX_NUM];
- LPITEM pItems[INVENTORY_AND_EQUIP_SLOT_MAX];
- BYTE bItemGrid[INVENTORY_AND_EQUIP_SLOT_MAX];
- LPITEM pDSItems[DRAGON_SOUL_INVENTORY_MAX_NUM];
- WORD wDSItemGrid[DRAGON_SOUL_INVENTORY_MAX_NUM];
- LPITEM pCubeItems[CUBE_MAX_NUM];
- LPCHARACTER pCubeNpc;
- LPCHARACTER battle_victim;
- BYTE gm_level;
- BYTE bBasePart;
- int iMaxStamina;
- BYTE bBlockMode;
- int iDragonSoulActiveDeck;
- LPENTITY m_pDragonSoulRefineWindowOpener;
- struct trigger
- class CTrigger
- struct TSkillUseInfo
- int iHitCount;
- int iMaxHitCount;
- int iSplashCount;
- DWORD dwNextSkillUsableTime;
- int iRange;
- bool bUsed;
- DWORD dwVID;
- bool isGrandMaster;
- boost::unordered_map<VID, size_t> TargetVIDMap;
- TSkillUseInfo()
- bool HitOnce(DWORD dwVnum = 0);
- bool UseSkill(bool isGrandMaster, DWORD vid, DWORD dwCooltime, int splashcount = 1, int hitcount = -1, int range = -1);
- DWORD GetMainTargetVID() const { return dwVID; }
- void SetMainTargetVID(DWORD vid) { dwVID=vid; }
- void ResetHitCount() { if (iSplashCount) { iHitCount = iMaxHitCount; iSplashCount--; } }
- struct packet_party_update TPacketGCPartyUpdate;
- class CExchange;
- class CSkillProto;
- class CParty;
- class CDungeon;
- class CWarMap;
- class CAffect;
- class CGuild;
- class CSafebox;
- class CArena;
- class CShop;
- class CShop * LPSHOP;
- class CMob;
- class CMobInstance;
- struct SMobSkillInfo TMobSkillInfo;
- int GetSkillPowerByLevelFromType(int job, int skillgroup, int skilllevel);
- class WeddingMap;
- enum e_overtime
- OT_NONE,
- OT_3HOUR,
- OT_5HOUR,
- class CHARACTER : public CEntity, public CFSM, public CHorseRider
- virtual void EncodeInsertPacket(LPENTITY entity);
- virtual void EncodeRemovePacket(LPENTITY entity);
- LPCHARACTER FindCharacterInView(const char * name, bool bFindPCOnly);
- void UpdatePacket();
- CStateTemplate<CHARACTER> m_stateMove;
- CStateTemplate<CHARACTER> m_stateBattle;
- CStateTemplate<CHARACTER> m_stateIdle;
- virtual void StateMove();
- virtual void StateBattle();
- virtual void StateIdle();
- virtual void StateFlag();
- virtual void StateFlagBase();
- void StateHorse();
- void __StateIdle_Monster();
- void __StateIdle_Stone();
- void __StateIdle_NPC();
- DWORD GetAIFlag() const { return m_pointsInstant.dwAIFlag; }
- void SetAggressive();
- bool IsAggressive() const;
- void SetCoward();
- bool IsCoward() const;
- void CowardEscape();
- void SetNoAttackShinsu();
- bool IsNoAttackShinsu() const;
- void SetNoAttackChunjo();
- bool IsNoAttackChunjo() const;
- void SetNoAttackJinno();
- bool IsNoAttackJinno() const;
- void SetAttackMob();
- bool IsAttackMob() const;
- virtual void BeginStateEmpty();
- virtual void EndStateEmpty() {}
- void RestartAtSamePos();
- DWORD m_dwStateDuration;
- CHARACTER();
- void Create(const char * c_pszName, DWORD vid, bool isPC);
- void Destroy();
- void Disconnect(const char * c_pszReason);
- void Initialize();
- DWORD GetPlayerID() const { return m_dwPlayerID; }
- void SetPlayerProto(const TPlayerTable * table);
- void CreatePlayerProto(TPlayerTable & tab);
- void SetProto(const CMob * c_pkMob);
- WORD GetRaceNum() const;
- void Save();
- void SaveReal();
- void FlushDelayedSaveItem();
- const char * GetName() const;
- const VID & GetVID() const{ return m_vid;}
- void SetName(const std::string& name) { m_stName = name; }
- void SetRace(BYTE race);
- bool ChangeSex();
- DWORD GetAID() const;
- int GetChangeEmpireCount() const;
- void SetChangeEmpireCount();
- int ChangeEmpire(BYTE empire);
- BYTE GetJob() const;
- BYTE GetCharType() const;
- bool IsPC() const { return GetDesc() ? true : false; }
- bool IsNPC() const { return m_bCharType != CHAR_TYPE_PC; }
- bool IsMonster() const { return m_bCharType == CHAR_TYPE_MONSTER; }
- bool IsStone() const { return m_bCharType == CHAR_TYPE_STONE; }
- bool IsDoor() const { return m_bCharType == CHAR_TYPE_DOOR; }
- bool IsBuilding() const { return m_bCharType == CHAR_TYPE_BUILDING; }
- bool IsWarp() const { return m_bCharType == CHAR_TYPE_WARP; }
- bool IsGoto() const { return m_bCharType == CHAR_TYPE_GOTO; }
- DWORD GetLastShoutPulse() const { return m_pointsInstant.dwLastShoutPulse; }
- void SetLastShoutPulse(DWORD pulse) { m_pointsInstant.dwLastShoutPulse = pulse; }
- int GetLevel() const { return m_points.level; }
- void SetLevel(BYTE level);
- BYTE GetGMLevel() const;
- BOOL IsGM() const;
- void SetGMLevel();
- DWORD GetExp() const { return m_points.exp; }
- void SetExp(DWORD exp) { m_points.exp = exp; }
- bool block_exp;
- DWORD GetNextExp() const;
- LPCHARACTER DistributeExp();
- void DistributeHP(LPCHARACTER pkKiller);
- void DistributeSP(LPCHARACTER pkKiller, int iMethod=0);
- void SetPosition(int pos);
- bool IsPosition(int pos) const { return m_pointsInstant.position == pos ? true : false; }
- int GetPosition() const { return m_pointsInstant.position; }
- void SetPart(BYTE bPartPos, WORD wVal);
- WORD GetPart(BYTE bPartPos) const;
- WORD GetOriginalPart(BYTE bPartPos) const;
- void SetHP(int hp) { m_points.hp = hp; }
- int GetHP() const { return m_points.hp; }
- void SetSP(int sp) { m_points.sp = sp; }
- int GetSP() const { return m_points.sp; }
- void SetStamina(int stamina) { m_points.stamina = stamina; }
- int GetStamina() const { return m_points.stamina; }
- void SetMaxHP(int iVal) { m_pointsInstant.iMaxHP = iVal; }
- int GetMaxHP() const { return m_pointsInstant.iMaxHP; }
- void SetMaxSP(int iVal) { m_pointsInstant.iMaxSP = iVal; }
- int GetMaxSP() const { return m_pointsInstant.iMaxSP; }
- void SetMaxStamina(int iVal) { m_pointsInstant.iMaxStamina = iVal; }
- int GetMaxStamina() const { return m_pointsInstant.iMaxStamina; }
- void SetRandomHP(int v) { m_points.iRandomHP = v; }
- void SetRandomSP(int v) { m_points.iRandomSP = v; }
- int GetRandomHP() const { return m_points.iRandomHP; }
- int GetRandomSP() const { return m_points.iRandomSP; }
- int GetHPPct() const;
- void SetRealPoint(BYTE idx, int val);
- int GetRealPoint(BYTE idx) const;
- void SetPoint(BYTE idx, int val);
- int GetPoint(BYTE idx) const;
- int GetLimitPoint(BYTE idx) const;
- int GetPolymorphPoint(BYTE idx) const;
- const TMobTable & GetMobTable() const;
- BYTE GetMobRank() const;
- BYTE GetMobBattleType() const;
- BYTE GetMobSize() const;
- DWORD GetMobDamageMin() const;
- DWORD GetMobDamageMax() const;
- WORD GetMobAttackRange() const;
- DWORD GetMobDropItemVnum() const;
- float GetMobDamageMultiply() const;
- bool IsBerserker() const;
- bool IsBerserk() const;
- void SetBerserk(bool mode);
- bool IsStoneSkinner() const;
- bool IsGodSpeeder() const;
- bool IsGodSpeed() const;
- void SetGodSpeed(bool mode);
- bool IsDeathBlower() const;
- bool IsDeathBlow() const;
- bool IsReviver() const;
- bool HasReviverInParty() const;
- bool IsRevive() const;
- void SetRevive(bool mode);
- bool IsRaceFlag(DWORD dwBit) const;
- bool IsSummonMonster() const;
- DWORD GetSummonVnum() const;
- DWORD GetPolymorphItemVnum() const;
- DWORD GetMonsterDrainSPPoint() const;
- void MainCharacterPacket();
- void ComputePoints();
- void ComputeBattlePoints();
- void PointChange(BYTE type, int amount, bool bAmount = false, bool bBroadcast = false);
- void PointsPacket();
- void ApplyPoint(BYTE bApplyType, int iVal);
- void CheckMaximumPoints();
- bool Show(long lMapIndex, long x, long y, long z = LONG_MAX, bool bShowSpawnMotion = false);
- void Sitdown(int is_ground);
- void Standup();
- void SetRotation(float fRot);
- void SetRotationToXY(long x, long y);
- float GetRotation() const { return m_pointsInstant.fRot; }
- void MotionPacketEncode(BYTE motion, LPCHARACTER victim, struct packet_motion * packet);
- void Motion(BYTE motion, LPCHARACTER victim = NULL);
- void ChatPacket(BYTE type, const char *format, ...);
- void MonsterChat(BYTE bMonsterChatType);
- void SendGreetMessage();
- void ResetPoint(int iLv);
- void SetBlockMode(BYTE bFlag);
- void SetBlockModeForce(BYTE bFlag);
- bool IsBlockMode(BYTE bFlag) const { return (m_pointsInstant.bBlockMode & bFlag)?true:false; }
- bool IsPolymorphed() const { return m_dwPolymorphRace>0; }
- bool IsPolyMaintainStat() const { return m_bPolyMaintainStat; }
- void SetPolymorph(DWORD dwRaceNum, bool bMaintainStat = false);
- DWORD GetPolymorphVnum() const { return m_dwPolymorphRace; }
- int GetPolymorphPower() const;
- void fishing();
- void fishing_take();
- void mining(LPCHARACTER chLoad);
- void mining_cancel();
- void mining_take();
- void ResetPlayTime(DWORD dwTimeRemain = 0);
- void CreateFly(BYTE bType, LPCHARACTER pkVictim);
- void ResetChatCounter();
- BYTE IncreaseChatCounter();
- BYTE GetChatCounter() const;
- DWORD m_dwPolymorphRace;
- bool m_bPolyMaintainStat;
- DWORD m_dwLoginPlayTime;
- DWORD m_dwPlayerID;
- VID m_vid;
- std::string m_stName;
- BYTE m_bCharType;
- CHARACTER_POINT m_points;
- CHARACTER_POINT_INSTANT m_pointsInstant;
- int m_iMoveCount;
- DWORD m_dwPlayStartTime;
- BYTE m_bAddChrState;
- bool m_bSkipSave;
- BYTE m_bChatCounter;
- bool IsStateMove() const { return IsState((CState&)m_stateMove); }
- bool IsStateIdle() const { return IsState((CState&)m_stateIdle); }
- bool IsWalking() const { return m_bNowWalking || GetStamina()<=0; }
- void SetWalking(bool bWalkFlag) { m_bWalking=bWalkFlag; }
- void SetNowWalking(bool bWalkFlag);
- void ResetWalking() { SetNowWalking(m_bWalking); }
- bool Goto(long x, long y);
- void Stop();
- bool CanMove() const;
- void SyncPacket();
- bool Sync(long x, long y);
- bool Move(long x, long y);
- void OnMove(bool bIsAttack = false);
- DWORD GetMotionMode() const;
- float GetMoveMotionSpeed() const;
- float GetMoveSpeed() const;
- void CalculateMoveDuration();
- void SendMovePacket(BYTE bFunc, BYTE bArg, DWORD x, DWORD y, DWORD dwDuration, DWORD dwTime=0, int iRot=-1);
- DWORD GetCurrentMoveDuration() const { return m_dwMoveDuration; }
- DWORD GetWalkStartTime() const { return m_dwWalkStartTime; }
- DWORD GetLastMoveTime() const { return m_dwLastMoveTime; }
- DWORD GetLastAttackTime() const { return m_dwLastAttackTime; }
- void SetLastAttacked(DWORD time);
- bool SetSyncOwner(LPCHARACTER ch, bool bRemoveFromList = true);
- bool IsSyncOwner(LPCHARACTER ch) const;
- bool WarpSet(long x, long y, long lRealMapIndex = 0);
- void SetWarpLocation(long lMapIndex, long x, long y);
- void WarpEnd();
- const PIXEL_POSITION & GetWarpPosition() const { return m_posWarp; }
- bool WarpToPID(DWORD dwPID);
- void SaveExitLocation();
- void ExitToSavedLocation();
- void StartStaminaConsume();
- void StopStaminaConsume();
- bool IsStaminaConsume() const;
- bool IsStaminaHalfConsume() const;
- void ResetStopTime();
- DWORD GetStopTime() const;
- void ClearSync();
- float m_fSyncTime;
- LPCHARACTER m_pkChrSyncOwner;
- CHARACTER_LIST m_kLst_pkChrSyncOwned;
- PIXEL_POSITION m_posDest;
- PIXEL_POSITION m_posStart;
- PIXEL_POSITION m_posWarp;
- long m_lWarpMapIndex;
- PIXEL_POSITION m_posExit;
- long m_lExitMapIndex;
- DWORD m_dwMoveStartTime;
- DWORD m_dwMoveDuration;
- DWORD m_dwLastMoveTime;
- DWORD m_dwLastAttackTime;
- DWORD m_dwWalkStartTime;
- DWORD m_dwStopTime;
- bool m_bWalking;
- bool m_bNowWalking;
- bool m_bStaminaConsume;
- void SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos);
- bool GetQuickslot(BYTE pos, TQuickslot ** ppSlot);
- bool SetQuickslot(BYTE pos, TQuickslot & rSlot);
- bool DelQuickslot(BYTE pos);
- bool SwapQuickslot(BYTE a, BYTE b);
- void ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos);
- TQuickslot m_quickslot[QUICKSLOT_MAX_NUM];
- void StartAffectEvent();
- void ClearAffect(bool bSave=false);
- void ComputeAffect(CAffect * pkAff, bool bAdd);
- bool AddAffect(DWORD dwType, BYTE bApplyOn, long lApplyValue, DWORD dwFlag, long lDuration, long lSPCost, bool bOverride, bool IsCube = false);
- void RefreshAffect();
- bool RemoveAffect(DWORD dwType);
- bool IsAffectFlag(DWORD dwAff) const;
- bool UpdateAffect();
- int ProcessAffect();
- void LoadAffect(DWORD dwCount, TPacketAffectElement * pElements);
- void SaveAffect();
- bool IsLoadedAffect() const { return m_bIsLoadedAffect; }
- bool IsGoodAffect(BYTE bAffectType) const;
- void RemoveGoodAffect();
- void RemoveBadAffect();
- CAffect * FindAffect(DWORD dwType, BYTE bApply=APPLY_NONE) const;
- const std::list<CAffect *> & GetAffectContainer() const { return m_list_pkAffect; }
- bool RemoveAffect(CAffect * pkAff);
- bool m_bIsLoadedAffect;
- TAffectFlag m_afAffectFlag;
- std::list<CAffect *> m_list_pkAffect;
- void SetParty(LPPARTY pkParty);
- LPPARTY GetParty() const { return m_pkParty; }
- bool RequestToParty(LPCHARACTER leader);
- void DenyToParty(LPCHARACTER member);
- void AcceptToParty(LPCHARACTER member);
- void PartyInvite(LPCHARACTER pchInvitee);
- void PartyInviteAccept(LPCHARACTER pchInvitee);
- void PartyInviteDeny(DWORD dwPID);
- bool BuildUpdatePartyPacket(TPacketGCPartyUpdate & out);
- int GetLeadershipSkillLevel() const;
- bool CanSummon(int iLeaderShip);
- void SetPartyRequestEvent(LPEVENT pkEvent) { m_pkPartyRequestEvent = pkEvent; }
- void PartyJoin(LPCHARACTER pkLeader);
- enum PartyJoinErrCode
- static PartyJoinErrCode IsPartyJoinableCondition(const LPCHARACTER pchLeader, const LPCHARACTER pchGuest);
- static PartyJoinErrCode IsPartyJoinableMutableCondition(const LPCHARACTER pchLeader, const LPCHARACTER pchGuest);
- LPPARTY m_pkParty;
- DWORD m_dwLastDeadTime;
- LPEVENT m_pkPartyRequestEvent;
- void SetDungeon(LPDUNGEON pkDungeon);
- LPDUNGEON GetDungeon() const { return m_pkDungeon; }
- LPDUNGEON GetDungeonForce() const;
- LPDUNGEON m_pkDungeon;
- int m_iEventAttr;
- void SetGuild(CGuild * pGuild);
- CGuild* GetGuild() const { return m_pGuild; }
- void SetWarMap(CWarMap* pWarMap);
- CWarMap* GetWarMap() const { return m_pWarMap; }
- CGuild * m_pGuild;
- DWORD m_dwUnderGuildWarInfoMessageTime;
- CWarMap * m_pWarMap;
- bool CanHandleItem(bool bSkipRefineCheck = false, bool bSkipObserver = false);
- bool IsItemLoaded() const { return m_bItemLoaded; }
- void SetItemLoaded() { m_bItemLoaded = true; }
- void ClearItem();
- void SetItem(TItemPos Cell, LPITEM item);
- LPITEM GetItem(TItemPos Cell) const;
- LPITEM GetInventoryItem(WORD wCell) const;
- bool IsEmptyItemGrid(TItemPos Cell, BYTE size, int iExceptionCell = -1) const;
- void SetWear(BYTE bCell, LPITEM item);
- LPITEM GetWear(BYTE bCell) const;
- void UseSilkBotary(void);
- void UseSilkBotaryReal(const TPacketMyshopPricelistHeader* p);
- bool UseItemEx(LPITEM item, TItemPos DestCell);
- bool UseItem(TItemPos Cell, TItemPos DestCell = NPOS);
- bool IsRefineThroughGuild() const;
- CGuild * GetRefineGuild() const;
- int ComputeRefineFee(int iCost, int iMultiply = 5) const;
- void PayRefineFee(int iTotalMoney);
- void SetRefineNPC(LPCHARACTER ch);
- bool RefineItem(LPITEM pkItem, LPITEM pkTarget);
- bool DestroyItem(TItemPos Cell);
- bool DropItem(TItemPos Cell, BYTE bCount=0);
- bool GiveRecallItem(LPITEM item);
- void ProcessRecallItem(LPITEM item);
- void EffectPacket(int enumEffectType);
- void SpecificEffectPacket(const char filename[128]);
- bool DoRefine(LPITEM item, bool bMoneyOnly = false);
- bool DoRefineWithScroll(LPITEM item);
- bool RefineInformation(BYTE bCell, BYTE bType, int iAdditionalCell = -1);
- void SetRefineMode(int iAdditionalCell = -1);
- void ClearRefineMode();
- bool GiveItem(LPCHARACTER victim, TItemPos Cell);
- bool CanReceiveItem(LPCHARACTER from, LPITEM item) const;
- void ReceiveItem(LPCHARACTER from, LPITEM item);
- bool GiveItemFromSpecialItemGroup(DWORD dwGroupNum, std::vector <DWORD> &dwItemVnums, std::vector <DWORD> &dwItemCounts, std::vector <LPITEM> &item_gets, int &count);
- bool MoveItem(TItemPos pos, TItemPos change_pos, BYTE num);
- bool PickupItem(DWORD vid);
- bool EquipItem(LPITEM item, int iCandidateCell = -1);
- bool UnequipItem(LPITEM item);
- bool CanEquipNow(const LPITEM item, const TItemPos& srcCell = NPOS, const TItemPos& destCell = NPOS);
- bool CanUnequipNow(const LPITEM item, const TItemPos& srcCell = NPOS, const TItemPos& destCell = NPOS);
- bool SwapItem(BYTE bCell, BYTE bDestCell);
- LPITEM AutoGiveItem(DWORD dwItemVnum, BYTE bCount=1, int iRarePct = -1, bool bMsg = true);
- void AutoGiveItem(LPITEM item, bool longOwnerShip = false);
- int GetEmptyInventory(BYTE size) const;
- int GetEmptyDragonSoulInventory(LPITEM pItem) const;
- void CopyDragonSoulItemGrid(std::vector<WORD>& vDragonSoulItemGrid) const;
- int CountEmptyInventory() const;
- int CountSpecifyItem(DWORD vnum) const;
- void RemoveSpecifyItem(DWORD vnum, DWORD count = 1);
- LPITEM FindSpecifyItem(DWORD vnum) const;
- LPITEM FindItemByID(DWORD id) const;
- int CountSpecifyTypeItem(BYTE type) const;
- void RemoveSpecifyTypeItem(BYTE type, DWORD count = 1);
- bool IsEquipUniqueItem(DWORD dwItemVnum) const;
- bool IsEquipUniqueGroup(DWORD dwGroupVnum) const;
- void SendEquipment(LPCHARACTER ch);
- void SendMyShopPriceListCmd(DWORD dwItemVnum, DWORD dwItemPrice);
- bool m_bNoOpenedShop;
- bool m_bItemLoaded;
- int m_iRefineAdditionalCell;
- bool m_bUnderRefine;
- DWORD m_dwRefineNPCVID;
- INT GetGold() const { return m_points.gold; }
- void SetGold(INT gold) { m_points.gold = gold; }
- bool DropGold(INT gold);
- INT GetAllowedGold() const;
- void GiveGold(INT iAmount);
- void SetShop(LPSHOP pkShop);
- LPSHOP GetShop() const { return m_pkShop; }
- void ShopPacket(BYTE bSubHeader);
- void SetShopOwner(LPCHARACTER ch) { m_pkChrShopOwner = ch; }
- LPCHARACTER GetShopOwner() const { return m_pkChrShopOwner;}
- void OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount);
- LPSHOP GetMyShop() const { return m_pkMyShop; }
- void CloseMyShop();
- LPSHOP m_pkShop;
- LPSHOP m_pkMyShop;
- std::string m_stShopSign;
- LPCHARACTER m_pkChrShopOwner;
- bool ExchangeStart(LPCHARACTER victim);
- void SetExchange(CExchange * pkExchange);
- CExchange * GetExchange() const { return m_pkExchange; }
- CExchange * m_pkExchange;
- struct TBattleInfo
- struct SAttackLog
- bool Damage(LPCHARACTER pAttacker, int dam, EDamageType type = DAMAGE_TYPE_NORMAL);
- bool __Profile__Damage(LPCHARACTER pAttacker, int dam, EDamageType type = DAMAGE_TYPE_NORMAL);
- void DeathPenalty(BYTE bExpLossPercent);
- void ReviveInvisible(int iDur);
- bool Attack(LPCHARACTER pkVictim, BYTE bType = 0);
- bool IsAlive() const { return m_pointsInstant.position == POS_DEAD ? false : true; }
- bool CanFight() const;
- bool CanBeginFight() const;
- void BeginFight(LPCHARACTER pkVictim);
- bool CounterAttack(LPCHARACTER pkChr);
- bool IsStun() const;
- void Stun();
- bool IsDead() const;
- void Dead(LPCHARACTER pkKiller = NULL, bool bImmediateDead=false);
- void Reward(bool bItemDrop);
- void RewardGold(LPCHARACTER pkAttacker);
- bool Shoot(BYTE bType);
- void FlyTarget(DWORD dwTargetVID, long x, long y, BYTE bHeader);
- void ForgetMyAttacker();
- void AggregateMonster();
- void AttractRanger();
- void PullMonster();
- int GetArrowAndBow(LPITEM * ppkBow, LPITEM * ppkArrow, int iArrowCount = 1);
- void UseArrow(LPITEM pkArrow, DWORD dwArrowCount);
- void AttackedByPoison(LPCHARACTER pkAttacker);
- void RemovePoison();
- void AttackedByFire(LPCHARACTER pkAttacker, int amount, int count);
- void RemoveFire();
- void UpdateAlignment(int iAmount);
- int GetAlignment() const;
- int GetRealAlignment() const;
- void ShowAlignment(bool bShow);
- void SetKillerMode(bool bOn);
- bool IsKillerMode() const;
- void UpdateKillerMode();
- BYTE GetPKMode() const;
- void SetPKMode(BYTE bPKMode);
- void ItemDropPenalty(LPCHARACTER pkKiller);
- void UpdateAggrPoint(LPCHARACTER ch, EDamageType type, int dam);
- void SetComboSequence(BYTE seq);
- BYTE GetComboSequence() const;
- void SetLastComboTime(DWORD time);
- DWORD GetLastComboTime() const;
- int GetValidComboInterval() const;
- void SetValidComboInterval(int interval);
- BYTE GetComboIndex() const;
- void IncreaseComboHackCount(int k = 1);
- void ResetComboHackCount();
- void SkipComboAttackByTime(int interval);
- DWORD GetSkipComboAttackByTime() const;
- BYTE m_bComboSequence;
- DWORD m_dwLastComboTime;
- int m_iValidComboInterval;
- BYTE m_bComboIndex;
- int m_iComboHackCount;
- DWORD m_dwSkipComboAttackByTime;
- void UpdateAggrPointEx(LPCHARACTER ch, EDamageType type, int dam, TBattleInfo & info);
- void ChangeVictimByAggro(int iNewAggro, LPCHARACTER pNewVictim);
- DWORD m_dwFlyTargetID;
- std::vector<DWORD> m_vec_dwFlyTargets;
- TDamageMap m_map_kDamage;
- DWORD m_dwKillerPID;
- int m_iAlignment; // Lawful/Chaotic value -200000 ~ 200000
- int m_iRealAlignment;
- int m_iKillerModePulse;
- BYTE m_bPKMode;
- DWORD m_dwLastVictimSetTime;
- int m_iMaxAggro;
- void SetStone(LPCHARACTER pkChrStone);
- void ClearStone();
- void DetermineDropMetinStone();
- DWORD GetDropMetinStoneVnum() const { return m_dwDropMetinStone; }
- BYTE GetDropMetinStonePct() const { return m_bDropMetinStonePct; }
- LPCHARACTER m_pkChrStone;
- CHARACTER_SET m_set_pkChrSpawnedBy;
- DWORD m_dwDropMetinStone;
- BYTE m_bDropMetinStonePct;
- enum
- SKILL_UP_BY_POINT,
- SKILL_UP_BY_BOOK,
- SKILL_UP_BY_TRAIN,
- SKILL_UP_BY_QUEST,
- void SkillLevelPacket();
- void SkillLevelUp(DWORD dwVnum, BYTE bMethod = SKILL_UP_BY_POINT);
- bool SkillLevelDown(DWORD dwVnum);
- bool UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster = true);
- void ResetSkill();
- void SetSkillLevel(DWORD dwVnum, BYTE bLev);
- int GetUsedSkillMasterType(DWORD dwVnum);
- bool IsLearnableSkill(DWORD dwSkillVnum) const;
- bool CheckSkillHitCount(const BYTE SkillID, const VID dwTargetVID);
- bool CanUseSkill(DWORD dwSkillVnum) const;
- bool IsUsableSkillMotion(DWORD dwMotionIndex) const;
- int GetSkillLevel(DWORD dwVnum) const;
- int GetSkillMasterType(DWORD dwVnum) const;
- int GetSkillPower(DWORD dwVnum, BYTE bLevel = 0) const;
- time_t GetSkillNextReadTime(DWORD dwVnum) const;
- void SetSkillNextReadTime(DWORD dwVnum, time_t time);
- void SkillLearnWaitMoreTimeMessage(DWORD dwVnum);
- void ComputePassiveSkill(DWORD dwVnum);
- int ComputeSkill(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel = 0);
- int ComputeSkillAtPosition(DWORD dwVnum, const PIXEL_POSITION& posTarget, BYTE bSkillLevel = 0);
- void ComputeSkillPoints();
- void SetSkillGroup(BYTE bSkillGroup);
- BYTE GetSkillGroup() const { return m_points.skill_group; }
- int ComputeCooltime(int time);
- void GiveRandomSkillBook();
- void DisableCooltime();
- bool LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb = 0);
- bool LearnGrandMasterSkill(DWORD dwSkillVnum);
- bool m_bDisableCooltime;
- DWORD m_dwLastSkillTime;
- bool HasMobSkill() const;
- size_t CountMobSkill() const;
- const TMobSkillInfo * GetMobSkill(unsigned int idx) const;
- bool CanUseMobSkill(unsigned int idx) const;
- bool UseMobSkill(unsigned int idx);
- void ResetMobSkillCooltime();
- DWORD m_adwMobSkillCooltime[MOB_SKILL_MAX_NUM];
- void StartMuyeongEvent();
- void StopMuyeongEvent();
- LPEVENT m_pkMuyeongEvent;
- int GetChainLightningIndex() const { return m_iChainLightingIndex; }
- void IncChainLightningIndex() { ++m_iChainLightingIndex; }
- void AddChainLightningExcept(LPCHARACTER ch) { m_setExceptChainLighting.insert(ch); }
- void ResetChainLightningIndex() { m_iChainLightingIndex = 0; m_setExceptChainLighting.clear(); }
- int GetChainLightningMaxCount() const;
- const CHARACTER_SET& GetChainLightingExcept() const { return m_setExceptChainLighting; }
- int m_iChainLightingIndex;
- CHARACTER_SET m_setExceptChainLighting;
- void SetAffectedEunhyung();
- void ClearAffectedEunhyung() { m_dwAffectedEunhyungLevel = 0; }
- bool GetAffectedEunhyung() const { return m_dwAffectedEunhyungLevel; }
- DWORD m_dwAffectedEunhyungLevel;
- TPlayerSkill* m_pSkillLevels;
- boost::unordered_map<BYTE, int> m_SkillDamageBonus;
- std::map<int, TSkillUseInfo> m_SkillUseInfo;
- void AssignTriggers(const TMobTable * table);
- LPCHARACTER GetVictim() const;
- void SetVictim(LPCHARACTER pkVictim);
- LPCHARACTER GetNearestVictim(LPCHARACTER pkChr);
- LPCHARACTER GetProtege() const;
- bool Follow(LPCHARACTER pkChr, float fMinimumDistance = 150.0f);
- bool Return();
- bool IsGuardNPC() const;
- bool IsChangeAttackPosition(LPCHARACTER target) const;
- void ResetChangeAttackPositionTime() { m_dwLastChangeAttackPositionTime = get_dword_time() - AI_CHANGE_ATTACK_POISITION_TIME_NEAR;}
- void SetChangeAttackPositionTime() { m_dwLastChangeAttackPositionTime = get_dword_time();}
- bool OnIdle();
- void OnAttack(LPCHARACTER pkChrAttacker);
- void OnClick(LPCHARACTER pkChrCauser);
- VID m_kVIDVictim;
- DWORD m_dwLastChangeAttackPositionTime;
- CTrigger m_triggerOnClick;
- LPCHARACTER m_pkChrTarget;
- CHARACTER_SET m_set_pkChrTargetedBy;
- void SetTarget(LPCHARACTER pkChrTarget);
- void BroadcastTargetPacket();
- void ClearTarget();
- void CheckTarget();
- LPCHARACTER GetTarget() const { return m_pkChrTarget; }
- int GetSafeboxSize() const;
- void QuerySafeboxSize();
- void SetSafeboxSize(int size);
- CSafebox * GetSafebox() const;
- void LoadSafebox(int iSize, DWORD dwGold, int iItemCount, TPlayerItem * pItems);
- void ChangeSafeboxSize(BYTE bSize);
- void CloseSafebox();
- void ReqSafeboxLoad(const char* pszPassword);
- void CancelSafeboxLoad( void ) { m_bOpeningSafebox = false; }
- void SetMallLoadTime(int t) { m_iMallLoadTime = t; }
- int GetMallLoadTime() const { return m_iMallLoadTime; }
- CSafebox * GetMall() const;
- void LoadMall(int iItemCount, TPlayerItem * pItems);
- void CloseMall();
- void SetSafeboxOpenPosition();
- float GetDistanceFromSafeboxOpen() const;
- CSafebox * m_pkSafebox;
- int m_iSafeboxSize;
- int m_iSafeboxLoadTime;
- bool m_bOpeningSafebox;
- CSafebox * m_pkMall;
- int m_iMallLoadTime;
- PIXEL_POSITION m_posSafeboxOpen;
- void MountVnum(DWORD vnum);
- DWORD GetMountVnum() const { return m_dwMountVnum; }
- DWORD GetLastMountTime() const { return m_dwMountTime; }
- bool CanUseHorseSkill();
- virtual void SetHorseLevel(int iLevel);
- virtual bool StartRiding();
- virtual bool StopRiding();
- virtual DWORD GetMyHorseVnum() const;
- virtual void HorseDie();
- virtual bool ReviveHorse();
- virtual void SendHorseInfo();
- virtual void ClearHorseInfo();
- void HorseSummon(bool bSummon, bool bFromFar = false, DWORD dwVnum = 0, const char* name = 0);
- LPCHARACTER GetHorse() const { return m_chHorse; } // 현재 소환중인 말
- LPCHARACTER GetRider() const; // rider on horse
- void SetRider(LPCHARACTER ch);
- bool IsRiding() const;
- #ifdef __PET_SYSTEM__
- CPetSystem* GetPetSystem() { return m_petSystem; }
- CPetSystem* m_petSystem;
- #endif
- LPCHARACTER m_chHorse;
- LPCHARACTER m_chRider;
- DWORD m_dwMountVnum;
- DWORD m_dwMountTime;
- BYTE m_bSendHorseLevel;
- BYTE m_bSendHorseHealthGrade;
- BYTE m_bSendHorseStaminaGrade;
- void DetailLog() { m_bDetailLog = !m_bDetailLog; }
- void ToggleMonsterLog();
- void MonsterLog(const char* format, ...);
- bool m_bDetailLog;
- bool m_bMonsterLog;
- void SetEmpire(BYTE bEmpire);
- BYTE GetEmpire() const { return m_bEmpire; }
- BYTE m_bEmpire;
- void SetRegen(LPREGEN pkRegen);
- PIXEL_POSITION m_posRegen;
- float m_fRegenAngle;
- LPREGEN m_pkRegen;
- size_t regen_id_;
- bool CannotMoveByAffect() const;
- bool IsImmune(DWORD dwImmuneFlag);
- void UpdateImmuneFlags();
- void SetImmuneFlag(DWORD dw) { m_pointsInstant.dwImmuneFlag = dw; }
- void ApplyMobAttribute(const TMobTable* table);
- void SetQuestNPCID(DWORD vid);
- DWORD GetQuestNPCID() const { return m_dwQuestNPCVID; }
- LPCHARACTER GetQuestNPC() const;
- void SetQuestItemPtr(LPITEM item);
- void ClearQuestItemPtr();
- LPITEM GetQuestItemPtr() const;
- void SetQuestBy(DWORD dwQuestVnum) { m_dwQuestByVnum = dwQuestVnum; }
- DWORD GetQuestBy() const { return m_dwQuestByVnum; }
- int GetQuestFlag(const std::string& flag) const;
- void SetQuestFlag(const std::string& flag, int value);
- void ConfirmWithMsg(const char* szMsg, int iTimeout, DWORD dwRequestPID);
- DWORD m_dwQuestNPCVID;
- DWORD m_dwQuestByVnum;
- LPITEM m_pQuestItem;
- bool StartStateMachine(int iPulse = 1);
- void StopStateMachine();
- void UpdateStateMachine(DWORD dwPulse);
- void SetNextStatePulse(int iPulseNext);
- void UpdateCharacter(DWORD dwPulse);
- void UpdateCharacter(DWORD dwPulse);
- DWORD m_dwNextStatePulse;
- LPCHARACTER GetMarryPartner() const;
- void SetMarryPartner(LPCHARACTER ch);
- int GetMarriageBonus(DWORD dwItemVnum, bool bSum = true);
- void SetWeddingMap(marriage::WeddingMap* pMap);
- marriage::WeddingMap* GetWeddingMap() const { return m_pWeddingMap; }
- marriage::WeddingMap* m_pWeddingMap;
- LPCHARACTER m_pkChrMarried;
- void StartWarpNPCEvent();
- void ChannelSwitch(int new_ch);
- void StartSaveEvent();
- void StartRecoveryEvent();
- void StartCheckSpeedHackEvent();
- void StartDestroyWhenIdleEvent();
- LPEVENT m_pkDeadEvent;
- LPEVENT m_pkStunEvent;
- LPEVENT m_pkSaveEvent;
- LPEVENT m_pkRecoveryEvent;
- LPEVENT m_pkTimedEvent;
- LPEVENT m_pkFishingEvent;
- LPEVENT m_pkAffectEvent;
- LPEVENT m_pkPoisonEvent;
- LPEVENT m_pkFireEvent;
- LPEVENT m_pkWarpNPCEvent;
- LPEVENT m_pkMiningEvent;
- LPEVENT m_pkWarpEvent;
- LPEVENT m_pkCheckSpeedHackEvent;
- LPEVENT m_pkDestroyWhenIdleEvent;
- LPEVENT m_pkPetSystemUpdateEvent;
- bool IsWarping() const { return m_pkWarpEvent ? true : false; }
- bool m_bHasPoisoned;
- const CMob * m_pkMobData;
- CMobInstance * m_pkMobInst;
- std::map<int, LPEVENT> m_mapMobSkillEvent;
- friend struct FuncSplashDamage;
- friend struct FuncSplashAffect;
- friend class CFuncShoot;
- int GetPremiumRemainSeconds(BYTE bType) const;
- int m_aiPremiumTimes[PREMIUM_MAX_NUM];
- static const DWORD msc_dwDefaultChangeItemAttrCycle;
- static const char msc_szLastChangeItemAttrFlag[];
- static const char msc_szChangeItemAttrCycleFlag[];
- bool ItemProcess_Hair(LPITEM item, int iDestCell);
- void ClearSkill();
- void ClearSubSkill();L
- bool ResetOneSkill(DWORD dwVnum);
- void SendDamagePacket(LPCHARACTER pAttacker, int Damage, BYTE DamageFlag);
- CArena *m_pArena;
- bool m_ArenaObserver;
- int m_nPotionLimit;
- void SetArena(CArena* pArena) { m_pArena = pArena; }
- void SetArenaObserverMode(bool flag) { m_ArenaObserver = flag; }
- CArena* GetArena() const { return m_pArena; }
- bool GetArenaObserverMode() const { return m_ArenaObserver; }
- void SetPotionLimit(int count) { m_nPotionLimit = count; }
- int GetPotionLimit() const { return m_nPotionLimit; }
- bool IsOpenSafebox() const { return m_isOpenSafebox ? true : false; }
- void SetOpenSafebox(bool b) { m_isOpenSafebox = b; }
- int GetSafeboxLoadTime() const { return m_iSafeboxLoadTime; }
- void SetSafeboxLoadTime() { m_iSafeboxLoadTime = thecore_pulse(); }
- bool m_isOpenSafebox;
- int GetSkillPowerByLevel(int level, bool bMob = false) const;
- int GetRefineTime() const { return m_iRefineTime; }
- void SetRefineTime() { m_iRefineTime = thecore_pulse(); }
- int m_iRefineTime;
- int GetUseSeedOrMoonBottleTime() const { return m_iSeedTime; }
- void SetUseSeedOrMoonBottleTime() { m_iSeedTime = thecore_pulse(); }
- int m_iSeedTime;
- int GetExchangeTime() const { return m_iExchangeTime; }
- void SetExchangeTime() { m_iExchangeTime = thecore_pulse(); }
- int m_iExchangeTime;
- int m_iMyShopTime;
- int GetMyShopTime() const { return m_iMyShopTime; }
- void SetMyShopTime() { m_iMyShopTime = thecore_pulse(); }
- bool IsHack(bool bSendMsg = true, bool bCheckShopOwner = true, int limittime = g_nPortalLimitTime);
- void Say(const std::string & s);
- bool ItemProcess_Polymorph(LPITEM item);
- LPITEM* GetCubeItem() { return m_pointsInstant.pCubeItems; }
- bool IsCubeOpen () const { return (m_pointsInstant.pCubeNpc?true:false); }
- void SetCubeNpc(LPCHARACTER npc) { m_pointsInstant.pCubeNpc = npc; }
- bool CanDoCube() const;
- bool IsSiegeNPC() const;
- e_overtime m_eOverTime;
- bool IsOverTime(e_overtime e) const { return (e == m_eOverTime); }
- void SetOverTime(e_overtime e) { m_eOverTime = e; }
- int m_deposit_pulse;
- void UpdateDepositPulse();
- bool CanDeposit() const;
- void __OpenPrivateShop();
- struct AttackedLog
- AttackLog m_kAttackLog;
- AttackedLog m_AttackedLog;
- int m_speed_hack_count;
- std::string m_strNewName;
- const std::string GetNewName() const { return this->m_strNewName; }
- void SetNewName(const std::string name) { this->m_strNewName = name; }
- void GoHome();
- std::set<DWORD> m_known_guild;
- void SendGuildName(CGuild* pGuild);
- void SendGuildName(DWORD dwGuildID);
- DWORD m_dwLogOffInterval;
- DWORD GetLogOffInterval() const { return m_dwLogOffInterval; }
- bool UnEquipSpecialRideUniqueItem ();
- bool CanWarp () const;
- DWORD m_dwLastGoldDropTime;
- void AutoRecoveryItemProcess (const EAffectTypes);
- void BuffOnAttr_AddBuffsFromItem(LPITEM pItem);
- void BuffOnAttr_RemoveBuffsFromItem(LPITEM pItem);
- void BuffOnAttr_ValueChange(BYTE bType, BYTE bOldValue, BYTE bNewValue);
- void BuffOnAttr_ClearAll();
- std::map <BYTE, CBuffOnAttributes*> TMapBuffOnAttrs;
- TMapBuffOnAttrs m_map_buff_on_attrs;
- void SetArmada() { cannot_dead = true; }
- void ResetArmada() { cannot_dead = false; }
- bool cannot_dead;
- #ifdef __PET_SYSTEM__
- bool m_bIsPet;
- void SetPet() { m_bIsPet = true; }
- bool IsPet() { return m_bIsPet; }
- #endif
- float m_fAttMul;
- float m_fDamMul;
- float GetAttMul() { return this->m_fAttMul; }
- void SetAttMul(float newAttMul) {this->m_fAttMul = newAttMul; }
- float GetDamMul() { return this->m_fDamMul; }
- void SetDamMul(float newDamMul) {this->m_fDamMul = newDamMul; }
- bool IsValidItemPosition(TItemPos Pos) const;
- unsigned int itemAward_vnum;
- char itemAward_cmd[20];
- unsigned int GetItemAward_vnum() { return itemAward_vnum; }
- char* GetItemAward_cmd() { return itemAward_cmd; }
- void SetItemAward_vnum(unsigned int vnum) { itemAward_vnum = vnum; }
- void SetItemAward_cmd(char* cmd) { strcpy(itemAward_cmd,cmd); }
- void DragonSoul_Initialize();
- bool DragonSoul_IsQualified() const;
- void DragonSoul_GiveQualification();
- int DragonSoul_GetActiveDeck() const;
- bool DragonSoul_IsDeckActivated() const;
- bool DragonSoul_ActivateDeck(int deck_idx);
- void DragonSoul_DeactivateAll();
- void DragonSoul_CleanUp();
- bool DragonSoul_RefineWindow_Open(LPENTITY pEntity);
- bool DragonSoul_RefineWindow_Close();
- LPENTITY DragonSoul_RefineWindow_GetOpener() { return m_pointsInstant.m_pDragonSoulRefineWindowOpener; }
- bool DragonSoul_RefineWindow_CanRefine();
- timeval m_tvLastSyncTime;
- int m_iSyncHackCount;
- void SetLastSyncTime(const timeval &tv) { memcpy(&m_tvLastSyncTime, &tv, sizeof(timeval)); }
- const timeval& GetLastSyncTime() { return m_tvLastSyncTime; }
- void SetSyncHackCount(int iCount) { m_iSyncHackCount = iCount;}
- int GetSyncHackCount() { return m_iSyncHackCount; }
- ESex GET_SEX(LPCHARACTER ch);
- char_manager.h
- class CDungeon;
- class CHARACTER;
- class CharacterVectorInteractor;
- class CHARACTER_MANAGER : public singleton<CHARACTER_MANAGER>
- TR1_NS::unordered_map<std::string, LPCHARACTER> NAME_MAP;
- CHARACTER_MANAGER();
- void Destroy();
- void GracefulShutdown();
- DWORD AllocVID();
- LPCHARACTER CreateCharacter(const char * name, DWORD dwPID = 0);
- void DestroyCharacter(LPCHARACTER ch);
- void Update(int iPulse);
- LPCHARACTER SpawnMob(DWORD dwVnum, long lMapIndex, long x, long y, long z, bool bSpawnMotion = false, int iRot = -1, bool bShow = true);
- LPCHARACTER SpawnMobRange(DWORD dwVnum, long lMapIndex, int sx, int sy, int ex, int ey, bool bIsException=false, bool bSpawnMotion = false , bool bAggressive = false);
- LPCHARACTER SpawnGroup(DWORD dwVnum, long lMapIndex, int sx, int sy, int ex, int ey, LPREGEN pkRegen = NULL, bool bAggressive_ = false, LPDUNGEON pDungeon = NULL);
- bool SpawnGroupGroup(DWORD dwVnum, long lMapIndex, int sx, int sy, int ex, int ey, LPREGEN pkRegen = NULL, bool bAggressive_ = false, LPDUNGEON pDungeon = NULL);
- bool SpawnMoveGroup(DWORD dwVnum, long lMapIndex, int sx, int sy, int ex, int ey, int tx, int ty, LPREGEN pkRegen = NULL, bool bAggressive_ = false);
- LPCHARACTER SpawnMobRandomPosition(DWORD dwVnum, long lMapIndex);
- void SelectStone(LPCHARACTER pkChrStone);
- NAME_MAP & GetPCMap() { return m_map_pkPCChr; }
- LPCHARACTER Find(DWORD dwVID);
- LPCHARACTER Find(const VID & vid);
- LPCHARACTER FindPC(const char * name);
- LPCHARACTER FindByPID(DWORD dwPID);
- bool AddToStateList(LPCHARACTER ch);
- void RemoveFromStateList(LPCHARACTER ch);
- void DelayedSave(LPCHARACTER ch);
- bool FlushDelayedSave(LPCHARACTER ch);
- void ProcessDelayedSave();
- template<class Func> Func for_each_pc(Func f);
- void RegisterForMonsterLog(LPCHARACTER ch);
- void UnregisterForMonsterLog(LPCHARACTER ch);
- void PacketMonsterLog(LPCHARACTER ch, const void* buf, int size);
- void KillLog(DWORD dwVnum);
- void RegisterRaceNum(DWORD dwVnum);
- void RegisterRaceNumMap(LPCHARACTER ch);
- void UnregisterRaceNumMap(LPCHARACTER ch);
- bool GetCharactersByRaceNum(DWORD dwRaceNum, CharacterVectorInteractor & i);
- LPCHARACTER FindSpecifyPC(unsigned int uiJobFlag, long lMapIndex, LPCHARACTER except=NULL, int iMinLevel = 1, int iMaxLevel = PLAYER_MAX_LEVEL_CONST);
- void SetMobItemRate(int value) { m_iMobItemRate = value; }
- void SetMobDamageRate(int value) { m_iMobDamageRate = value; }
- void SetMobGoldAmountRate(int value) { m_iMobGoldAmountRate = value; }
- void SetMobGoldDropRate(int value) { m_iMobGoldDropRate = value; }
- void SetMobExpRate(int value) { m_iMobExpRate = value; }
- void SetMobItemRatePremium(int value) { m_iMobItemRatePremium = value; }
- void SetMobGoldAmountRatePremium(int value) { m_iMobGoldAmountRatePremium = value; }
- void SetMobGoldDropRatePremium(int value) { m_iMobGoldDropRatePremium = value; }
- void SetMobExpRatePremium(int value) { m_iMobExpRatePremium = value; }
- void SetUserDamageRatePremium(int value) { m_iUserDamageRatePremium = value; }
- void SetUserDamageRate(int value ) { m_iUserDamageRate = value; }
- int GetMobItemRate(LPCHARACTER ch);
- int GetMobDamageRate(LPCHARACTER ch);
- int GetMobGoldAmountRate(LPCHARACTER ch);
- int GetMobGoldDropRate(LPCHARACTER ch);
- int GetMobExpRate(LPCHARACTER ch);
- int GetUserDamageRate(LPCHARACTER ch);
- void SendScriptToMap(long lMapIndex, const std::string & s);
- bool BeginPendingDestroy();
- void FlushPendingDestroy();
- int m_iMobItemRate;
- int m_iMobDamageRate;
- int m_iMobGoldAmountRate;
- int m_iMobGoldDropRate;
- int m_iMobExpRate;
- int m_iMobItemRatePremium;
- int m_iMobGoldAmountRatePremium;
- int m_iMobGoldDropRatePremium;
- int m_iMobExpRatePremium;
- int m_iUserDamageRate;
- int m_iUserDamageRatePremium;
- int m_iVIDCount;
- TR1_NS::unordered_map<DWORD, LPCHARACTER> m_map_pkChrByVID;
- TR1_NS::unordered_map<DWORD, LPCHARACTER> m_map_pkChrByPID;
- NAME_MAP m_map_pkPCChr;
- char dummy1[1024]; // memory barrier
- CHARACTER_SET m_set_pkChrState;
- CHARACTER_SET m_set_pkChrForDelayedSave;
- CHARACTER_SET m_set_pkChrMonsterLog;
- LPCHARACTER m_pkChrSelectedStone;
- std::map<DWORD, DWORD> m_map_dwMobKillCount;
- std::set<DWORD> m_set_dwRegisteredRaceNum;
- std::map<DWORD, CHARACTER_SET> m_map_pkChrByRaceNum;
- bool m_bUsePendingDestroy;
- CHARACTER_SET m_set_pkChrPendingDestroy;
- Func CHARACTER_MANAGER::for_each_pc(Func f)
- class CharacterVectorInteractor : public CHARACTER_VECTOR
- CharacterVectorInteractor() : m_bMyBegin(false) { }
- CharacterVectorInteractor(const CHARACTER_SET & r);
- virtual ~CharacterVectorInteractor();
- bool m_bMyBegin;
- cmd.h
- struct command_info
- struct command_info cmd_info[];
- void interpret_command(LPCHARACTER ch, const char * argument, size_t len);
- void interpreter_set_privilege(const char * cmd, int lvl);
- enum SCMD_ACTION
- SCMD_SLAP,SCMD_KISS,SCMD_FRENCH_KISS,
- SCMD_HUG,SCMD_LONG_HUG,SCMD_SHOLDER,SCMD_FOLD_ARM
- enum SCMD_CMD
- SCMD_LOGOUT,SCMD_QUIT,
- SCMD_PHASE_SELECT,SCMD_SHUTDOWN,
- enum SCMD_RESTART
- SCMD_RESTART_TOWN,
- SCMD_RESTART_HERE
- enum SCMD_XMAS
- SCMD_XMAS_BOOM,
- SCMD_XMAS_SNOW,
- SCMD_XMAS_SANTA,
- void Shutdown(int iSec);
- void SendNotice(const char * c_pszBuf);
- void SendLog(const char * c_pszBuf);
- void BroadcastNotice(const char * c_pszBuf);
- void SendNoticeMap(const char* c_pszBuf, int nMapIndex, bool bBigFont);
- void CHARACTER_SetBGMVolumeEnable();
- void CHARACTER_AddBGMInfo(unsigned mapIndex, const char* name, float vol);
- void CHARACTER_AddGotoInfo(const std::string& c_st_name, BYTE empire, int mapIndex, DWORD x, DWORD y);
- config.h
- enum
- ADDRESS_MAX_LEN = 15
- void config_init(const std::string& st_localeServiceName); // default "" is CONFIG
- char sql_addr[256];
- WORD mother_port;
- WORD p2p_port;
- char db_addr[ADDRESS_MAX_LEN + 1];
- WORD db_port;
- int passes_per_sec;
- int save_event_second_cycle;
- int ping_event_second_cycle;
- int test_server;
- bool guild_mark_server;
- BYTE guild_mark_min_level;
- bool distribution_test_server;
- bool china_event_server;
- bool g_bNoMoreClient;
- bool g_bNoRegen;
- bool g_bEmpireShopPriceTrippleDisable;
- bool g_bShoutAddonEnable;
- bool g_bGlobalShoutEnable;
- bool g_bDisablePrismNeed;
- bool g_bDisableEmotionMask;
- BYTE g_bItemCountLimit;
- bool g_bDisableItemBonusChangeTime;
- bool g_bAllMountAttack;
- bool g_bTrafficProfileOn;
- BYTE g_bChannel;
- bool map_allow_find(int index);
- void map_allow_copy(long * pl, int size);
- bool no_wander;
- int g_iUserLimit;
- time_t g_global_time;
- const char * get_table_postfix();
- std::string g_stHostname;
- std::string g_stLocale;
- std::string g_stLocaleFilename;
- char g_szPublicIP[16];
- char g_szInternalIP[16];
- int (*is_twobyte) (const char * str);
- int (*check_name) (const char * str);
- bool g_bSkillDisable;
- int g_iFullUserCount;
- int g_iBusyUserCount;
- void LoadStateUserCount();
- bool g_bEmpireWhisper;
- BYTE g_bAuthServer;
- BYTE g_bBilling;
- BYTE PK_PROTECT_LEVEL;
- void LoadValidCRCList();
- bool IsValidProcessCRC(DWORD dwCRC);
- bool IsValidFileCRC(DWORD dwCRC);
- std::string g_stAuthMasterIP;
- WORD g_wAuthMasterPort;
- std::string g_stClientVersion;
- bool g_bCheckClientVersion;
- void CheckClientVersion();
- std::string g_stQuestDir;
- std::set<std::string> g_setQuestObjectDir;
- std::vector<std::string> g_stAdminPageIP;
- std::string g_stAdminPagePassword;
- int SPEEDHACK_LIMIT_COUNT;
- int SPEEDHACK_LIMIT_BONUS;
- int g_iSyncHackLimitCount;
- int g_server_id;
- std::string g_strWebMallURL;
- int VIEW_RANGE;
- int VIEW_BONUS_RANGE;
- bool g_bCheckMultiHack;
- bool g_protectNormalPlayer;
- bool g_noticeBattleZone;
- DWORD g_GoldDropTimeLimitValue;
- int gPlayerMaxLevel;
- int gPlayerStats;
- int gShutdownAge;
- int gShutdownEnable;
- bool g_BlockCharCreation;
- constants.h
- enum EMonsterChatState
- MONSTER_CHAT_WAIT,MONSTER_CHAT_ATTACK,
- MONSTER_CHAT_CHASE,MONSTER_CHAT_ATTACKED,
- struct SMobRankStat
- int iGoldPercent;
- struct SMobStat
- BYTE byLevel;
- WORD HP;
- DWORD dwExp;
- WORD wDefGrade;
- struct SBattleTypeStat
- int AttGradeBias;
- int DefGradeBias;
- int MagicAttGradeBias;
- int MagicDefGradeBias;
- struct SJobInitialPoints
- int st, ht, dx, iq;
- int max_hp, max_sp;
- int hp_per_ht, sp_per_iq;
- int hp_per_lv_begin, hp_per_lv_end;
- int sp_per_lv_begin, sp_per_lv_end;
- int max_stamina;
- int stamina_per_con;
- int stamina_per_lv_begin, stamina_per_lv_end;
- struct __coord
- int x, y;
- struct SApplyInfo
- BYTE bPointType;
- enum
- FORTUNE_BIG_LUCK,FORTUNE_LUCK,FORTUNE_SMALL_LUCK,
- FORTUNE_NORMAL,FORTUNE_SMALL_BAD_LUCK,FORTUNE_BAD_LUCK,
- FORTUNE_BIG_BAD_LUCK,FORTUNE_MAX_NUM,
- const int STONE_INFO_MAX_NUM = 10;
- const int STONE_LEVEL_MAX_NUM = 4;
- SStoneDropInfo
- DWORD dwMobVnum;
- int iDropPct;
- int iLevelPct[STONE_LEVEL_MAX_NUM+1];
- const TApplyInfo aApplyInfo[MAX_APPLY_NUM];
- const TMobRankStat MobRankStats[MOB_RANK_MAX_NUM];
- TBattleTypeStat BattleTypeStats[BATTLE_TYPE_MAX_NUM];
- const DWORD party_exp_distribute_table[PLAYER_MAX_LEVEL_CONST + 1];
- const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1];
- DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1];
- const DWORD exp_table_newcibn[PLAYER_EXP_TABLE_MAX + 1];
- const DWORD* exp_table;
- const DWORD guild_exp_table[GUILD_MAX_LEVEL + 1];
- const DWORD guild_exp_table2[GUILD_MAX_LEVEL + 1];
- #define MAX_EXP_DELTA_OF_LEV 31
- #define PERCENT_LVDELTA(me, victim) aiPercentByDeltaLev[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]
- #define PERCENT_LVDELTA_BOSS(me, victim) aiPercentByDeltaLevForBoss[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]
- #define CALCULATE_VALUE_LVDELTA(me, victim, val) ((val * PERCENT_LVDELTA(me, victim)) / 100)
- const int aiPercentByDeltaLev_euckr[MAX_EXP_DELTA_OF_LEV];
- const int aiPercentByDeltaLevForBoss_euckr[MAX_EXP_DELTA_OF_LEV];
- const int * aiPercentByDeltaLev;
- const int * aiPercentByDeltaLevForBoss;
- #define ARROUND_COORD_MAX_NUM 161
- Coord aArroundCoords[ARROUND_COORD_MAX_NUM];
- TJobInitialPoints JobInitialPoints[JOB_MAX_NUM];
- const int aiMobEnchantApplyIdx[MOB_ENCHANTS_MAX_NUM];
- const int aiMobResistsApplyIdx[MOB_RESISTS_MAX_NUM];
- const int aSkillAttackAffectProbByRank[MOB_RANK_MAX_NUM];
- const int aiItemMagicAttributePercentHigh[ITEM_ATTRIBUTE_MAX_LEVEL];
- const int aiItemMagicAttributePercentLow[ITEM_ATTRIBUTE_MAX_LEVEL];
- const int aiItemAttributeAddPercent[ITEM_ATTRIBUTE_MAX_NUM];
- const int aiWeaponSocketQty[WEAPON_NUM_TYPES];
- const int aiArmorSocketQty[ARMOR_NUM_TYPES];
- const int aiSocketPercentByQty[5][4];
- const int aiExpLossPercents[PLAYER_EXP_TABLE_MAX + 1];
- const int * aiSkillPowerByLevel;
- const int aiSkillPowerByLevel_euckr[SKILL_MAX_LEVEL + 1];
- const int aiPolymorphPowerByLevel[SKILL_MAX_LEVEL + 1];
- const int aiSkillBookCountForLevelUp[10];
- const int aiGrandMasterSkillBookCountForLevelUp[10];
- const int aiGrandMasterSkillBookMinCount[10];
- const int aiGrandMasterSkillBookMaxCount[10];
- const int CHN_aiPartyBonusExpPercentByMemberCount[9];
- const int KOR_aiPartyBonusExpPercentByMemberCount[9];
- const int KOR_aiUniqueItemPartyBonusExpPercentByMemberCount[9];
- std::map<DWORD, TItemAttrTable> TItemAttrMap;
- TItemAttrMap g_map_itemAttr;
- TItemAttrMap g_map_itemRare;
- const int * aiChainLightningCountBySkillLevel;
- const int aiChainLightningCountBySkillLevel_euckr[SKILL_MAX_LEVEL + 1];
- const char * c_apszEmpireNames[EMPIRE_MAX_NUM];
- const char * c_apszPrivNames[MAX_PRIV_NUM];
- const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM];
- struct
- long lMapIndex;int iWarPrice;
- int iWinnerPotionRewardPctToWinner;int iLoserPotionRewardPctToWinner;
- int iInitialScore;int iEndScore;
- TGuildWarInfo KOR_aGuildWarInfo[GUILD_WAR_TYPE_MAX_NUM];
- enum
- ITEM_ACCESSORY_SOCKET_MAX_NUM = 3
- const int aiAccessorySocketAddPct[ITEM_ACCESSORY_SOCKET_MAX_NUM];
- const int aiAccessorySocketEffectivePct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1];
- const int aiAccessorySocketDegradeTime[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1];
- const int aiAccessorySocketPutPct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1];
- long FN_get_apply_type(const char *apply_type_string);
- long FN_get_apply_type(const char *apply_type_string);
- crc32.h
- unsigned long crc_t;
- crc_t GetCRC32(const char * buffer, size_t count);
- crc_t GetCaseCRC32(const char * buffer, size_t count);
- crc_t GetFastHash(const char * key, size_t len);
- cube.h
- struct CUBE_VALUE
- DWORD vnum;
- int count;
- struct CUBE_DATA
- std::vector<WORD> npc_vnum;
- std::vector<CUBE_VALUE> item;
- std::vector<CUBE_VALUE> reward;
- int percent;
- unsigned int gold;
- CUBE_DATA();
- bool can_make_item (LPITEM *items, WORD npc_vnum);
- CUBE_VALUE* reward_value ();
- void remove_material (LPCHARACTER ch);
- void Cube_init ();
- bool Cube_load (const char *file);
- bool Cube_make (LPCHARACTER ch);
- void Cube_clean_item (LPCHARACTER ch);
- void Cube_open (LPCHARACTER ch);
- void Cube_close (LPCHARACTER ch);
- void Cube_show_list (LPCHARACTER ch);
- void Cube_add_item (LPCHARACTER ch, int cube_index, int inven_index);
- void Cube_delete_item (LPCHARACTER ch, int cube_index);
- void Cube_request_result_list(LPCHARACTER ch);
- void Cube_request_material_info(LPCHARACTER ch, int request_start_index, int request_count = 1);
- void Cube_print();
- bool Cube_InformationInitialize();
- db.h
- enum
- QUERY_TYPE_RETURN = 1,
- QUERY_TYPE_FUNCTION = 2,
- QUERY_TYPE_AFTER_FUNCTION = 3,
- enum
- QID_SAFEBOX_SIZE,
- QID_DB_STRING,
- QID_AUTH_LOGIN,
- QID_AUTH_LOGIN_OPENID,
- QID_LOTTO,
- QID_HIGHSCORE_REGISTER,
- QID_HIGHSCORE_SHOW,
- QID_BILLING_GET_TIME,
- QID_BILLING_CHECK,
- QID_BLOCK_CHAT_LIST,
- QID_PROTECT_CHILD,
- QID_JAPAN_CREATE_ID,
- struct SUseTime
- DWORD dwLoginKey;
- char szLogin[LOGIN_MAX_LEN+1];
- BYTE bBillType;
- DWORD dwUseSec;
- char szIP[MAX_HOST_LENGTH+1];
- class CQueryInfo
- int iQueryType;
- class CReturnQueryInfo : public CQueryInfo
- int iType;
- DWORD dwIdent;
- void * pvData;
- class CFuncQueryInfo : public CQueryInfo
- any_function f;
- class CFuncAfterQueryInfo : public CQueryInfo
- any_void_function f;
- class CLoginData;
- class DBManager : public singleton<DBManager>
- DBManager();
- bool IsConnected();
- bool Connect(const char * host, const int port, const char * user, const char * pwd, const char * db);
- void Query(const char * c_pszFormat, ...);
- SQLMsg * DirectQuery(const char * c_pszFormat, ...);
- void ReturnQuery(int iType, DWORD dwIdent, void* pvData, const char * c_pszFormat, ...);
- void Process();
- void AnalyzeReturnQuery(SQLMsg * pmsg);
- void SendMoneyLog(BYTE type, DWORD vnum, int gold);
- void LoginPrepare(BYTE bBillType, DWORD dwBillID, long lRemainSecs, LPDESC d, DWORD * pdwClientKey, int * paiPremiumTimes = NULL);
- void SendAuthLogin(LPDESC d);
- void SendLoginPing(const char * c_pszLogin);
- void InsertLoginData(CLoginData * pkLD);
- void DeleteLoginData(CLoginData * pkLD);
- CLoginData * GetLoginData(DWORD dwKey);
- void SetBilling(DWORD dwKey, bool bOn, bool bSkipPush = false);
- void PushBilling(CLoginData * pkLD);
- void FlushBilling(bool bForce=false);
- void CheckBilling();
- void StopAllBilling();
- DWORD CountQuery() { return m_sql.CountQuery(); }
- DWORD CountQueryResult() { return m_sql.CountResult(); }
- void ResetQueryResult() { m_sql.ResetQueryFinished(); }
- void LoadDBString();
- const std::string & GetDBString(const std::string& key);
- const std::vector<std::string> & GetGreetMessage();
- template<class Functor> void FuncQuery(Functor f, const char * c_pszFormat, ...);
- template<class Functor> void FuncAfterQuery(Functor f, const char * c_pszFormat, ...);
- size_t EscapeString(char* dst, size_t dstSize, const char *src, size_t srcSize);
- SQLMsg * PopResult()
- CAsyncSQL m_sql;
- CAsyncSQL m_sql_direct;
- bool m_bIsConnect;
- std::map<std::string, std::string> m_map_dbstring;
- std::vector<std::string> m_vec_GreetMessage;
- std::map<DWORD, CLoginData *> m_map_pkLoginData;
- std::map<std::string, CLoginData *> mapLDBilling;
- std::vector<TUseTime> m_vec_kUseTime;
- template <class Functor> void DBManager::FuncQuery(Functor f, const char* c_pszFormat, ...)
- template <class Functor> void DBManager::FuncAfterQuery(Functor f, const char* c_pszFormat, ...)
- struct SHighscoreRegisterQueryInfo
- char szBoard[20+1];
- DWORD dwPID;
- int iValue;
- bool bOrder;
- void SendBillingExpire(const char * c_pszLogin, BYTE bBillType, int iSecs, CLoginData * pkLD);
- void VCardUse(LPCHARACTER CardOwner, LPCHARACTER CardTaker, LPITEM item);
- class AccountDB : public singleton<AccountDB>
- AccountDB();
- bool IsConnected();
- bool Connect(const char * host, const int port, const char * user, const char * pwd, const char * db);
- bool ConnectAsync(const char * host, const int port, const char * user, const char * pwd, const char * db, const char * locale);
- SQLMsg* DirectQuery(const char * query);
- void ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...);
- void AsyncQuery(const char* query);
- void SetLocale(const std::string & stLocale);
- void Process();
- SQLMsg * PopResult();
- void AnalyzeReturnQuery(SQLMsg * pMsg);
- CAsyncSQL2 m_sql_direct;
- CAsyncSQL2 m_sql;
- bool m_IsConnect;
- debug_allocator.h
- DebugAllocatorAdapter<ALLOCATOR_DETAIL> DebugAllocator;
- void* operator new(size_t size, const char* file, size_t line)
- void* operator new[](size_t size, const char* file, size_t line)
- void debug_delete(T* p, const char* file, size_t line)
- void debug_delete(DebugPtr<T> ptr, const char* file, size_t line)
- void debug_delete_array(T* p, const char* file, size_t line)
- void debug_delete_array(DebugPtr<T> ptr, const char* file, size_t line)
- void operator delete(void* p, const char* file, size_t line)
- debug_allocator_adapter.h
- struct AllocTag
- AllocTag(const char* file, size_t line) : in_use(true), age(1)
- void Reuse(const char* file, size_t line)
- void Unuse(const char* file, size_t line)
- static size_t IncreaseAge(size_t value)
- bool in_use;
- const char* file;
- size_t line;
- size_t age; // incremented on both the cases; alloc and free
- struct ScopedOutputFile
- ScopedOutputFile(const char* filename,std::ios_base::openmode mode = std::ios_base::app)
- std::ostream& Datetime()
- std::ofstream stream;
- class DebugPtr
- class DebugAllocatorAdapter
- static void StaticSetUp()
- static void StaticTearDown()
- static void* Alloc(size_t size)
- static void Free(void* p)
- static size_t MarkAcquired(void* p, const char* file, size_t line, const char* context)
- static T* MarkReleased(T* p, const char* file, size_t line, const char* context)
- static T* MarkReleased(DebugPtr<T>& ptr, const char* file, size_t line, const char* context)
- static size_t RetrieveAge(void* p)
- static T* Verify(T* p, size_t age, const char* file = NULL, size_t line = 0)
- static T* VerifyDeletion(T* p, const char* file, size_t line, bool verify_age = false, size_t age = 0)
- static void LogBoundaryCorruption(void* p, size_t age)
- DebugAllocatorAdapter() {}
- static DebugAllocatorAdapter& GetInstance()
- bool VerifyReference(void* p, const char* file, size_t line,const char* context, bool mark_released,bool verify_age = false, size_t age = 0)
- void DumpLeakReport()
- void PrintStack( std::ostream& out )
- debug_ptr.h
- class DebugPtr
- DebugPtr() : p_(NULL), age_(0) {}
- DebugPtr(T* p) : p_(p)
- DebugPtr(U* p) : p_(static_cast<T*>(p))
- DebugPtr(T* p, size_t age) : p_(p), age_(age) {}
- DebugPtr(const DebugPtr& o) : p_(o.p_), age_(o.age_) {}
- template<typename U>
- DebugPtr(const DebugPtr<U>& o) : p_(static_cast<T*>(o.Get())), age_(o.GetAge()) {}
- T* Get() const { return p_; }
- size_t GetAge() const { return age_; }
- DebugPtr& operator=(const DebugPtr& rhs)
- T* GetVerified() const
- DebugPtr& Swap(DebugPtr& o)
- T* p_;
- size_t age_;
- desc.h
- class CInputProcessor;
- enum EDescType
- DESC_TYPE_ACCEPTOR,
- DESC_TYPE_CONNECTOR
- class CLoginKey
- CLoginKey(DWORD dwKey, LPDESC pkDesc) : m_dwKey(dwKey), m_pkDesc(pkDesc)
- void Expire()
- operator DWORD() const
- DWORD m_dwKey;
- DWORD m_dwExpireTime;
- LPDESC m_pkDesc;
- struct seq_t
- BYTE hdr;
- BYTE seq;
- class DESC
- EVENTINFO(desc_event_info)
- DESC();
- virtual BYTE GetType() { return DESC_TYPE_ACCEPTOR; }
- virtual void Destroy();
- virtual void SetPhase(int _phase);
- void FlushOutput();
- bool Setup(LPFDWATCH _fdw, socket_t _fd, const struct sockaddr_in & c_rSockAddr, DWORD _handle, DWORD _handshake);
- socket_t GetSocket() const { return m_sock; }
- const char * GetHostName() { return m_stHost.c_str(); }
- WORD GetPort() { return m_wPort; }
- void SetP2P(const char * h, WORD w, BYTE b) { m_stP2PHost = h; m_wP2PPort = w; m_bP2PChannel = b; }
- const char * GetP2PHost() { return m_stP2PHost.c_str(); }
- WORD GetP2PPort() const { return m_wP2PPort; }
- BYTE GetP2PChannel() const { return m_bP2PChannel; }
- void BufferedPacket(const void * c_pvData, int iSize);
- void Packet(const void * c_pvData, int iSize);
- void LargePacket(const void * c_pvData, int iSize);
- int ProcessInput(); // returns -1 if error
- int ProcessOutput(); // returns -1 if error
- CInputProcessor * GetInputProcessor() { return m_pInputProcessor; }
- DWORD GetHandle() const { return m_dwHandle; }
- LPBUFFER GetOutputBuffer() { return m_lpOutputBuffer; }
- void BindAccountTable(TAccountTable * pTable);
- TAccountTable & GetAccountTable() { return m_accountTable; }
- void BindCharacter(LPCHARACTER ch);
- LPCHARACTER GetCharacter() { return m_lpCharacter; }
- bool IsPhase(int phase) const { return m_iPhase == phase ? true : false; }
- const struct sockaddr_in & GetAddr() { return m_SockAddr; }
- void UDPGrant(const struct sockaddr_in & c_rSockAddr);
- const struct sockaddr_in & GetUDPAddr() { return m_UDPSockAddr; }
- void Log(const char * format, ...);
- void StartHandshake(DWORD _dw);
- void SendHandshake(DWORD dwCurTime, long lNewDelta);
- bool HandshakeProcess(DWORD dwTime, long lDelta, bool bInfiniteRetry=false);
- bool IsHandshaking();
- DWORD GetHandshake() const { return m_dwHandshake; }
- DWORD GetClientTime();
- void SetSecurityKey(const DWORD * c_pdwKey);
- const DWORD * GetEncryptionKey() const { return &m_adwEncryptionKey[0]; }
- const DWORD * GetDecryptionKey() const { return &m_adwDecryptionKey[0]; }
- BYTE GetEmpire();
- void SetRelay(const char * c_pszName);
- bool DelayedDisconnect(int iSec);
- void DisconnectOfSameLogin();
- void SetAdminMode();
- bool IsAdminMode();
- void SetPong(bool b);
- bool IsPong();
- BYTE GetSequence();
- void SetNextSequence();
- void SendLoginSuccessPacket();
- void SetLoginKey(DWORD dwKey);
- void SetLoginKey(CLoginKey * pkKey);
- DWORD GetLoginKey();
- void AssembleCRCMagicCube(BYTE bProcPiece, BYTE bFilePiece);
- void SetBillingExpireSecond(DWORD dwSec);
- DWORD GetBillingExpireSecond();
- void SetClientVersion(const char * c_pszTimestamp) { m_stClientVersion = c_pszTimestamp; }
- const char * GetClientVersion() { return m_stClientVersion.c_str(); }
- bool isChannelStatusRequested() const { return m_bChannelStatusRequested; }
- void SetChannelStatusRequested(bool bChannelStatusRequested) { m_bChannelStatusRequested = bChannelStatusRequested; }
- void Initialize();
- CInputProcessor * m_pInputProcessor;
- CInputClose m_inputClose;
- CInputHandshake m_inputHandshake;
- CInputLogin m_inputLogin;
- CInputMain m_inputMain;
- CInputDead m_inputDead;
- CInputAuth m_inputAuth;
- LPFDWATCH m_lpFdw;
- socket_t m_sock;
- int m_iPhase;
- DWORD m_dwHandle;
- std::string m_stHost;
- WORD m_wPort;
- time_t m_LastTryToConnectTime;
- LPBUFFER m_lpInputBuffer;
- int m_iMinInputBufferLen;
- DWORD m_dwHandshake;
- DWORD m_dwHandshakeSentTime;
- int m_iHandshakeRetry;
- DWORD m_dwClientTime;
- bool m_bHandshaking;
- LPBUFFER m_lpBufferedOutputBuffer;
- LPBUFFER m_lpOutputBuffer;
- LPEVENT m_pkPingEvent;
- LPCHARACTER m_lpCharacter;
- TAccountTable m_accountTable;
- struct sockaddr_in m_SockAddr;
- struct sockaddr_in m_UDPSockAddr;
- FILE * m_pLogFile;
- std::string m_stRelayName;
- std::string m_stP2PHost;
- WORD m_wP2PPort;
- BYTE m_bP2PChannel;
- bool m_bAdminMode;
- bool m_bPong;
- int m_iCurrentSequence;
- CLoginKey * m_pkLoginKey;
- DWORD m_dwLoginKey;
- BYTE m_bCRCMagicCubeIdx;
- DWORD m_dwProcCRC;
- DWORD m_dwFileCRC;
- bool m_bHackCRCQuery;
- DWORD m_dwBillingExpireSecond;
- std::string m_stClientVersion;
- std::string m_Login;
- int m_outtime;
- int m_playtime;
- int m_offtime;
- bool m_bDestroyed;
- bool m_bChannelStatusRequested;
- bool m_bEncrypted;
- DWORD m_adwDecryptionKey[4];
- DWORD m_adwEncryptionKey[4];
- LPEVENT m_pkDisconnectEvent;
- void SetLogin( const std::string & login ) { m_Login = login; }
- void SetLogin( const char * login ) { m_Login = login; }
- const std::string& GetLogin() { return m_Login; }
- void SetOutTime( int outtime ) { m_outtime = outtime; }
- void SetOffTime( int offtime ) { m_offtime = offtime; }
- void SetPlayTime( int playtime ) { m_playtime = playtime; }
- void RawPacket(const void * c_pvData, int iSize);
- void ChatPacket(BYTE type, const char * format, ...);
- seq_vector_t m_seq_vector;
- void push_seq (BYTE hdr, BYTE seq);
- desc_client.h
- class CLIENT_DESC : public DESC
- CLIENT_DESC();
- virtual BYTE GetType() { return DESC_TYPE_CONNECTOR; }
- virtual void Destroy();
- virtual void SetPhase(int phase);
- bool Connect(int iPhaseWhenSucceed = 0);
- void Setup(LPFDWATCH _fdw, const char * _host, WORD _port);
- void SetRetryWhenClosed(bool);
- void DBPacketHeader(BYTE bHeader, DWORD dwHandle, DWORD dwSize);
- void DBPacket(BYTE bHeader, DWORD dwHandle, const void * c_pvData, DWORD dwSize);
- void Packet(const void * c_pvData, int iSize);
- bool IsRetryWhenClosed();
- void Update(DWORD t);
- void UpdateChannelStatus(DWORD t, bool fForce);
- void Reset();
- void InitializeBuffers();
- int m_iPhaseWhenSucceed;
- bool m_bRetryWhenClosed;
- time_t m_LastTryToConnectTime;
- time_t m_tLastChannelStatusUpdateTime;
- CInputDB m_inputDB;
- CInputP2P m_inputP2P;
- LPCLIENT_DESC db_clientdesc;
- LPCLIENT_DESC g_pkAuthMasterDesc;
- LPCLIENT_DESC g_NetmarbleDBDesc;
- desc_manager.h
- class CLoginKey;
- class DESC_MANAGER : public singleton<DESC_MANAGER>
- TR1_NS::unordered_set<LPDESC> DESC_SET;
- TR1_NS::unordered_set<LPCLIENT_DESC> CLIENT_DESC_SET;
- std::map<int, LPDESC> DESC_HANDLE_MAP;
- std::map<DWORD, LPDESC> DESC_HANDSHAKE_MAP;
- std::map<DWORD, LPDESC> DESC_ACCOUNTID_MAP;
- boost::unordered_map<std::string, LPDESC> DESC_LOGINNAME_MAP;
- std::map<DWORD, DWORD> DESC_HANDLE_RANDOM_KEY_MAP;
- DESC_MANAGER();
- void Initialize();
- void Destroy();
- LPDESC AcceptDesc(LPFDWATCH fdw, socket_t s);
- LPDESC AcceptP2PDesc(LPFDWATCH fdw, socket_t s);
- void DestroyDesc(LPDESC d, bool erase_from_set = true);
- DWORD CreateHandshake();
- LPCLIENT_DESC CreateConnectionDesc(LPFDWATCH fdw, const char * host, WORD port, int iPhaseWhenSucceed, bool bRetryWhenClosed);
- void TryConnect();
- LPDESC FindByHandle(DWORD handle);
- LPDESC FindByHandshake(DWORD dwHandshake);
- LPDESC FindByCharacterName(const char* name);
- LPDESC FindByLoginName(const std::string& login);
- void ConnectAccount(const std::string& login, LPDESC d);
- void DisconnectAccount(const std::string& login);
- void DestroyClosed();
- void UpdateLocalUserCount();
- DWORD GetLocalUserCount() { return m_iLocalUserCount; }
- void GetUserCount(int & iTotal, int ** paiEmpireUserCount, int & iLocalCount);
- const DESC_SET & GetClientSet();
- DWORD MakeRandomKey(DWORD dwHandle);
- bool GetRandomKey(DWORD dwHandle, DWORD* prandom_key);
- DWORD CreateLoginKey(LPDESC d);
- LPDESC FindByLoginKey(DWORD dwKey);
- void ProcessExpiredLoginKey();
- bool IsDisconnectInvalidCRC() { return m_bDisconnectInvalidCRC; }
- void SetDisconnectInvalidCRCMode(bool bMode) { m_bDisconnectInvalidCRC = bMode; }
- bool IsP2PDescExist(const char * szHost, WORD wPort);
- bool m_bDisconnectInvalidCRC;
- DESC_HANDLE_RANDOM_KEY_MAP m_map_handle_random_key;
- CLIENT_DESC_SET m_set_pkClientDesc;
- DESC_SET m_set_pkDesc;
- DESC_HANDLE_MAP m_map_handle;
- DESC_HANDSHAKE_MAP m_map_handshake;
- DESC_LOGINNAME_MAP m_map_loginName;
- std::map<DWORD, CLoginKey *> m_map_pkLoginKey;
- int m_iSocketsConnected;
- int m_iHandleCount;
- int m_iLocalUserCount;
- int m_aiEmpireUserCount[EMPIRE_MAX_NUM];
- bool m_bDestroyed;
- desc_p2p.h
- class DESC_P2P : public DESC
- virtual void Destroy();
- virtual void SetPhase(int iPhase);
- bool Setup(LPFDWATCH _fdw, socket_t fd, const char * host, WORD wPort);
- dev_log.h
- #define L_WARN (1<<1)
- #define L_ERR (1<<2)
- #define L_CRIT (1<<3)
- #define L_INFO (1<<4)
- #define L_MIN (1<<5)
- #define L_MAX (1<<6)
- #define L_LIB0 (1<<7)
- #define L_LIB1 (1<<8)
- #define L_LIB2 (1<<9)
- #define L_LIB3 (1<<10)
- #define L_DEB0 (1<<11)
- #define L_DEB1 (1<<12)
- #define L_DEB2 (1<<13)
- #define L_DEB3 (1<<14)
- #define L_USR0 (1<<15)
- #define L_USR1 (1<<16)
- #define L_USR2 (1<<17)
- #define L_USR3 (1<<18)
- #define LOG_WARN __FILE__,__LINE__,__FUNCTION__,L_WARN
- #define LOG_ERR __FILE__,__LINE__,__FUNCTION__,L_ERR
- #define LOG_CRIT __FILE__,__LINE__,__FUNCTION__,L_CRIT
- #define LOG_INFO __FILE__,__LINE__,__FUNCTION__,L_INFO
- #define LOG_MIN __FILE__,__LINE__,__FUNCTION__,L_MIN
- #define LOG_MAX __FILE__,__LINE__,__FUNCTION__,L_MAX
- #define LOG_LIB0 __FILE__,__LINE__,__FUNCTION__,L_LIB0
- #define LOG_LIB1 __FILE__,__LINE__,__FUNCTION__,L_LIB1
- #define LOG_LIB2 __FILE__,__LINE__,__FUNCTION__,L_LIB2
- #define LOG_LIB3 __FILE__,__LINE__,__FUNCTION__,L_LIB3
- #define LOG_DEB0 __FILE__,__LINE__,__FUNCTION__,L_DEB0
- #define LOG_DEB1 __FILE__,__LINE__,__FUNCTION__,L_DEB1
- #define LOG_DEB2 __FILE__,__LINE__,__FUNCTION__,L_DEB2
- #define LOG_DEB3 __FILE__,__LINE__,__FUNCTION__,L_DEB3
- #define LOG_USR0 __FILE__,__LINE__,__FUNCTION__,L_USR0
- #define LOG_USR1 __FILE__,__LINE__,__FUNCTION__,L_USR1
- #define LOG_USR2 __FILE__,__LINE__,__FUNCTION__,L_USR2
- #define LOG_USR3 __FILE__,__LINE__,__FUNCTION__,L_USR3
- void dev_log(const char *file, int line, const char *function, int level, const char *fmt, ...);
- void dev_log_add_level(int level);
- void dev_log_del_level(int level);
- void dev_log_set_level(int mask);
- dragon_soul_table.h
- struct SApply
- SApply (EApplyTypes at, int av, float p = 0.f) : apply_type(at), apply_value(av), prob(p) {}
- EApplyTypes apply_type;
- int apply_value;
- float prob;
- const int DRAGON_SOUL_ADDITIONAL_ATTR_START_IDX = 3;
- class CGroupNode;
- class CGroupTextParseTreeLoader;
- class DragonSoulTable
- DragonSoulTable();
- std::vector <SApply> TVecApplys;
- std::map <BYTE, TVecApplys> TMapApplyGroup;
- bool ReadDragonSoulTableFile(const char * c_pszFileName);
- bool GetDragonSoulGroupName(BYTE bType, std::string& stGroupName) const;
- bool GetBasicApplys(BYTE ds_type, OUT TVecApplys& vec_basic_applys);
- bool GetAdditionalApplys(BYTE ds_type, OUT TVecApplys& vec_additional_attrs);
- bool GetApplyNumSettings(BYTE ds_type, BYTE grade_idx, OUT int& basis, OUT int& add_min, OUT int& add_max);
- bool GetWeight(BYTE ds_type, BYTE grade_idx, BYTE step_index, BYTE strength_idx, OUT float& fWeight);
- bool GetRefineGradeValues(BYTE ds_type, BYTE grade_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs);
- bool GetRefineStepValues(BYTE ds_type, BYTE step_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs);
- bool GetRefineStrengthValues(BYTE ds_type, BYTE material_type, BYTE strength_idx, OUT int& fee, OUT float& prob);
- bool GetDragonHeartExtValues(BYTE ds_type, BYTE grade_idx, OUT std::vector<float>& vec_chargings, OUT std::vector<float>& vec_probs);
- bool GetDragonSoulExtValues(BYTE ds_type, BYTE grade_idx, OUT float& prob, OUT DWORD& by_product);
- CGroupTextParseTreeLoader* m_pLoader;
- std::string stFileName;
- CGroupNode* m_pApplyNumSettingNode;
- CGroupNode* m_pWeightTableNode;
- CGroupNode* m_pRefineGradeTableNode;
- CGroupNode* m_pRefineStepTableNode;
- CGroupNode* m_pRefineStrengthTableNode;
- CGroupNode* m_pDragonHeartExtTableNode;
- CGroupNode* m_pDragonSoulExtTableNode;
- std::map <std::string, BYTE> TMapNameToType;
- std::map <BYTE, std::string> TMapTypeToName;
- std::vector <std::string> m_vecDragonSoulNames;
- std::vector <BYTE> m_vecDragonSoulTypes;
- TMapNameToType m_map_name_to_type;
- TMapTypeToName m_map_type_to_name;
- TMapApplyGroup m_map_basic_applys_group;
- TMapApplyGroup m_map_additional_applys_group;
- bool ReadVnumMapper();
- bool ReadBasicApplys();
- bool ReadAdditionalApplys();
- bool CheckApplyNumSettings();
- bool CheckWeightTables();
- bool CheckRefineGradeTables();
- bool CheckRefineStepTables();
- bool CheckRefineStrengthTables();
- bool CheckDragonHeartExtTables();
- bool CheckDragonSoulExtTables();
- DragonLair.h
- class CDragonLair
- CDragonLair (DWORD dwGuildID, long BaseMapID, long PrivateMapID);
- DWORD GetEstimatedTime () const;
- void OnDragonDead (LPCHARACTER pDragon);
- DWORD StartTime_;
- DWORD GuildID_;
- long BaseMapIndex_;
- long PrivateMapIndex_;
- class CDragonLairManager : public singleton<CDragonLairManager>
- CDragonLairManager ();
- bool Start (long MapIndexFrom, long BaseMapIndex, DWORD GuildID);
- void OnDragonDead (LPCHARACTER pDragon, DWORD KillerGuildID);
- size_t GetLairCount () const { return LairMap_.size(); }
- boost::unordered_map<DWORD, CDragonLair*> LairMap_;
- DragonSoul.h
- class CHARACTER;
- class CItem;
- class DragonSoulTable;
- class DSManager : public singleton<DSManager>
- DSManager();
- bool ReadDragonSoulTableFile(const char * c_pszFileName);
- void GetDragonSoulInfo(DWORD dwVnum, OUT BYTE& bType, OUT BYTE& bGrade, OUT BYTE& bStep, OUT BYTE& bRefine) const;
- WORD GetBasePosition(const LPITEM pItem) const;
- bool IsValidCellForThisItem(const LPITEM pItem, const TItemPos& Cell) const;
- int GetDuration(const LPITEM pItem) const;
- bool ExtractDragonHeart(LPCHARACTER ch, LPITEM pItem, LPITEM pExtractor = NULL);
- bool PullOut(LPCHARACTER ch, TItemPos DestCell, IN OUT LPITEM& pItem, LPITEM pExtractor = NULL);
- bool DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
- bool DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
- bool DoRefineStrength(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
- bool DragonSoulItemInitialize(LPITEM pItem);
- bool IsTimeLeftDragonSoul(LPITEM pItem) const;
- int LeftTime(LPITEM pItem) const;
- bool ActivateDragonSoul(LPITEM pItem);
- bool DeactivateDragonSoul(LPITEM pItem, bool bSkipRefreshOwnerActiveState = false);
- bool IsActiveDragonSoul(LPITEM pItem) const;
- void SendRefineResultPacket(LPCHARACTER ch, BYTE bSubHeader, const TItemPos& pos);
- void RefreshDragonSoulState(LPCHARACTER ch);
- DWORD MakeDragonSoulVnum(BYTE bType, BYTE grade, BYTE step, BYTE refine);
- bool PutAttributes(LPITEM pDS);
- bool RefreshItemAttributes(LPITEM pItem);
- DragonSoulTable* m_pTable;
- dungeon.h
- class CParty;
- class CDungeon
- TR1_NS::unordered_map<LPPARTY, int> TPartyMap;
- std::map<std::string, LPCHARACTER> TUniqueMobMap;
- uint32_t IdType;
- IdType GetId() const { return m_id; }
- void Notice(const char* msg);
- void JoinParty(LPPARTY pParty);
- void QuitParty(LPPARTY pParty);
- void Join(LPCHARACTER ch);
- void IncMember(LPCHARACTER ch);
- void DecMember(LPCHARACTER ch);
- void Purge();
- void KillAll();
- void IncMonster() { m_iMonsterCount++; sys_log(0, "MonsterCount %d", m_iMonsterCount); }
- void DecMonster() { m_iMonsterCount--; CheckEliminated(); }
- int CountMonster() { return m_iMonsterCount; }
- int CountRealMonster();
- void IncPartyMember(LPPARTY pParty, LPCHARACTER ch);
- void DecPartyMember(LPPARTY pParty, LPCHARACTER ch);
- void IncKillCount(LPCHARACTER pkKiller, LPCHARACTER pkVictim);
- int GetKillMobCount();
- int GetKillStoneCount();
- bool IsUsePotion();
- bool IsUseRevive();
- void UsePotion(LPCHARACTER ch);
- void UseRevive(LPCHARACTER ch);
- long GetMapIndex() { return m_lMapIndex; }
- void Spawn(DWORD vnum, const char* pos);
- LPCHARACTER SpawnMob(DWORD vnum, int x, int y, int dir = 0);
- LPCHARACTER SpawnMob_ac_dir(DWORD vnum, int x, int y, int dir = 0);
- LPCHARACTER SpawnGroup(DWORD vnum, long x, long y, float radius, bool bAggressive=false, int count=1);
- void SpawnNameMob(DWORD vnum, int x, int y, const char* name);
- void SpawnGotoMob(long lFromX, long lFromY, long lToX, long lToY);
- void SpawnRegen(const char* filename, bool bOnce = true);
- void AddRegen(LPREGEN regen);
- void ClearRegen();
- bool IsValidRegen(LPREGEN regen, size_t regen_id);
- void SetUnique(const char* key, DWORD vid);
- void SpawnMoveUnique(const char* key, DWORD vnum, const char* pos_from, const char* pos_to);
- void SpawnMoveGroup(DWORD vnum, const char* pos_from, const char* pos_to, int count=1);
- void SpawnUnique(const char* key, DWORD vnum, const char* pos);
- void SpawnStoneDoor(const char* key, const char* pos);
- void SpawnWoodenDoor(const char* key, const char* pos);
- void KillUnique(const std::string& key);
- void PurgeUnique(const std::string& key);
- bool IsUniqueDead(const std::string& key);
- float GetUniqueHpPerc(const std::string& key);
- DWORD GetUniqueVid(const std::string& key);
- void DeadCharacter(LPCHARACTER ch);
- void UniqueSetMaxHP(const std::string& key, int iMaxHP);
- void UniqueSetHP(const std::string& key, int iHP);
- void UniqueSetDefGrade(const std::string& key, int iGrade);
- void SendDestPositionToParty(LPPARTY pParty, long x, long y);
- void CheckEliminated();
- void JumpAll(long lFromMapIndex, int x, int y);
- void WarpAll(long lFromMapIndex, int x, int y);
- void JumpParty(LPPARTY pParty, long lFromMapIndex, int x, int y);
- void ExitAll();
- void ExitAllToStartPosition();
- void JumpToEliminateLocation();
- void SetExitAllAtEliminate(long time);
- void SetWarpAtEliminate(long time, long lMapIndex, int x, int y, const char* regen_file);
- int GetFlag(std::string name);
- void SetFlag(std::string name, int value);
- void SetWarpLocation (long map_index, int x, int y);
- std::vector <std::pair <DWORD, int> > ItemGroup;
- void CreateItemGroup (std::string& group_name, ItemGroup& item_group);
- const ItemGroup* GetItemGroup (std::string& group_name);
- template <class Func> Func ForEachMember(Func f);
- bool IsAllPCNearTo( int x, int y, int dist );
- CDungeon(IdType id, long lOriginalMapIndex, long lMapIndex);
- void Initialize();
- void CheckDestroy();
- IdType m_id;
- DWORD m_lOrigMapIndex;
- DWORD m_lMapIndex;
- CHARACTER_SET m_set_pkCharacter;
- std::map<std::string, int> m_map_Flag;
- std::map<std::string, ItemGroup> ItemGroupMap;
- ItemGroupMap m_map_ItemGroup;
- TPartyMap m_map_pkParty;
- TAreaMap& m_map_Area;
- TUniqueMobMap m_map_UniqueMob;
- int m_iMobKill;
- int m_iStoneKill;
- bool m_bUsePotion;
- bool m_bUseRevive;
- int m_iMonsterCount;
- bool m_bExitAllAtEliminate;
- bool m_bWarpAtEliminate;
- int m_iWarpDelay;
- long m_lWarpMapIndex;
- long m_lWarpX;
- long m_lWarpY;
- std::string m_stRegenFile;
- std::vector<LPREGEN> m_regen;
- LPEVENT deadEvent;
- LPEVENT exit_all_event_;
- LPEVENT jump_to_event_;
- size_t regen_id_;
- friend class CDungeonManager;
- friend EVENTFUNC(dungeon_dead_event);
- friend EVENTFUNC(dungeon_exit_all_event);
- friend EVENTFUNC(dungeon_jump_to_event);
- LPPARTY m_pParty;
- public :
- void SetPartyNull();
- class CDungeonManager : public singleton<CDungeonManager>
- std::map<CDungeon::IdType, LPDUNGEON> TDungeonMap;
- std::map<long, LPDUNGEON> TMapDungeon;
- CDungeonManager();
- virtual ~CDungeonManager();
- LPDUNGEON Create(long lOriginalMapIndex);
- void Destroy(CDungeon::IdType dungeon_id);
- LPDUNGEON Find(CDungeon::IdType dungeon_id);
- LPDUNGEON FindByMapIndex(long lMapIndex);
- TDungeonMap m_map_pkDungeon;
- TMapDungeon m_map_pkMapDungeon;
- CDungeon::IdType next_id_;
- empire_text_convert.h
- bool LoadEmpireTextConvertTable(DWORD dwEmpireID, const char* c_szFileName);
- void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct);
- entity.h
- class SECTREE;
- class CEntity
- TR1_NS::unordered_map<LPENTITY, int> ENTITY_MAP;
- CEntity();
- virtual void EncodeInsertPacket(LPENTITY entity) = 0;
- virtual void EncodeRemovePacket(LPENTITY entity) = 0;
- void Initialize(int type = -1);
- void Destroy();
- void SetType(int type);
- int GetType() const;
- bool IsType(int type) const;
- void ViewCleanup();
- void ViewInsert(LPENTITY entity, bool recursive = true);
- void ViewRemove(LPENTITY entity, bool recursive = true);
- void ViewReencode();
- int GetViewAge() const { return m_iViewAge; }
- long GetX() const { return m_pos.x; }
- long GetY() const { return m_pos.y; }
- long GetZ() const { return m_pos.z; }
- const PIXEL_POSITION & GetXYZ() const { return m_pos; }
- void SetXYZ(long x, long y, long z) { m_pos.x = x, m_pos.y = y, m_pos.z = z; }
- void SetXYZ(const PIXEL_POSITION & pos) { m_pos = pos; }
- LPSECTREE GetSectree() const { return m_pSectree; }
- void SetSectree(LPSECTREE tree) { m_pSectree = tree; }
- void UpdateSectree();
- void PacketAround(const void * data, int bytes, LPENTITY except = NULL);
- void PacketView(const void * data, int bytes, LPENTITY except = NULL);
- void BindDesc(LPDESC _d) { m_lpDesc = _d; }
- LPDESC GetDesc() const { return m_lpDesc; }
- void SetMapIndex(long l) { m_lMapIndex = l; }
- long GetMapIndex() const { return m_lMapIndex; }
- void SetObserverMode(bool bFlag);
- bool IsObserverMode() const { return m_bIsObserver; }
- bool m_bIsObserver;
- bool m_bObserverModeChange;
- ENTITY_MAP m_map_view;
- long m_lMapIndex;
- LPDESC m_lpDesc;
- int m_iType;
- bool m_bIsDestroyed;
- PIXEL_POSITION m_pos;
- int m_iViewAge;
- LPSECTREE m_pSectree;
- event.h
- struct event_info_data
- event_info_data() {}
- virtual ~event_info_data() {}
- struct event EVENT;
- boost::intrusive_ptr<EVENT> LPEVENT;
- long (*TEVENTFUNC) (LPEVENT event, long processing_time);
- struct TQueueElement;
- struct event
- event() : func(NULL), info(NULL), q_el(NULL), ref_count(0) {}
- TEVENTFUNC func;
- event_info_data* info;
- TQueueElement * q_el;
- char is_force_to_end;
- char is_processing;
- size_t ref_count;
- void intrusive_ptr_add_ref(EVENT* p);
- void intrusive_ptr_release(EVENT* p);
- void event_destroy();
- int event_process(int pulse);
- int event_count();
- LPEVENT event_create_ex(TEVENTFUNC func, event_info_data* info, long when);
- void event_cancel(LPEVENT * event);
- long event_processing_time(LPEVENT event);
- long event_time(LPEVENT event);
- void event_reset_time(LPEVENT event, long when);
- void event_set_verbose(int level);
- event_info_data* FindEventInfo(DWORD dwID);
- event_info_data* event_info(LPEVENT event);
- event_queue.h
- struct TQueueElement
- LPEVENT pvData;
- int iStartTime;
- int iKey;
- bool bCancel;
- class CEventQueue
- struct FuncQueueComp
- CEventQueue();
- TQueueElement * Enqueue(LPEVENT data, int duration, int pulse);
- TQueueElement * Dequeue();
- void Delete(TQueueElement * pElem);
- void Requeue(TQueueElement *, int key);
- int GetTopKey();
- int Size();
- void Destroy();
- stable_priority_queue<TQueueElement *, std::vector<TQueueElement *>, FuncQueueComp> m_pq_queue;
- exchange.h
- class CGrid;
- enum EExchangeValues
- EXCHANGE_ITEM_MAX_NUM = 12,
- EXCHANGE_MAX_DISTANCE = 1000
- class CExchange
- CExchange(LPCHARACTER pOwner);
- bool Accept(bool bIsAccept = true);
- void Cancel();
- bool AddGold(long lGold);
- bool AddItem(TItemPos item_pos, BYTE display_pos);
- bool RemoveItem(BYTE pos);
- LPCHARACTER GetOwner() { return m_pOwner; }
- CExchange * GetCompany() { return m_pCompany; }
- bool GetAcceptStatus() { return m_bAccept; }
- void SetCompany(CExchange * pExchange) { m_pCompany = pExchange; }
- bool Done();
- bool Check(int * piItemCount);
- bool CheckSpace();
- CExchange * m_pCompany; // 상대방의 CExchange 포인터
- LPCHARACTER m_pOwner;
- TItemPos m_aItemPos[EXCHANGE_ITEM_MAX_NUM];
- LPITEM m_apItems[EXCHANGE_ITEM_MAX_NUM];
- BYTE m_abItemDisplayPos[EXCHANGE_ITEM_MAX_NUM];
- bool m_bAccept;
- long m_lGold;
- CGrid * m_pGrid;
- file_allocator.h
- class FifoAllocator {
- FifoAllocator() {}
- void SetUp() {}
- void TearDown() {}
- void* Alloc(size_t size) {}
- void Free(void* p) {}
- void CleanUp() {}
- std::deque<void*> PoolType;
- TR1_NS::unordered_map<size_t, PoolType> PoolMapType;
- TR1_NS::unordered_map<void*, size_t> AllocMapType;
- static const size_t kWatermark = 4; // FIFO enforcement level
- PoolMapType pool_map_;
- AllocMapType alloc_map_;
- file_loader.h
- class CMemoryTextFileLoader
- CMemoryTextFileLoader();
- virtual ~CMemoryTextFileLoader();
- void Bind(int bufSize, const void* c_pvBuf);
- DWORD GetLineCount();
- bool CheckLineIndex(DWORD dwLine);
- bool SplitLine(DWORD dwLine, std::vector<std::string> * pstTokenVector, const char * c_szDelimeter = " \t");
- const std::string & GetLineString(DWORD dwLine);
- std::vector<std::string> m_stLineVector;
- FileMonitor_FreeBSD.h
- struct FileIOContext_FreeBSD
- int fhMonitor;
- int idxToEventList; // evtTrigger & evtMonitor index should be same
- PFN_FileChangeListener pListenFunc;
- class FileMonitorFreeBSD : public IFileMonitor
- FileMonitorFreeBSD(); //hidden
- virtual ~FileMonitorFreeBSD();
- void AddWatch (const std::string& strFileName, PFN_FileChangeListener pListenerFunc);
- void Update (DWORD dwPulses);
- static FileMonitorFreeBSD& Instance() { }
- boost::unordered_map<std::string, FileIOContext_FreeBSD> TMonitorFileHashMap;
- std::vector<struct kevent> TEventList;
- TMonitorFileHashMap m_FileLists;
- TEventList m_MonitoredEventLists;
- TEventList m_TriggeredEventLists;
- int m_KernelEventQueue;
- fishing.h
- enum
- CAMPFIRE_MOB = 12000,
- FISHER_MOB = 9009,
- FISH_MIND_PILL_VNUM = 27610,
- EVENTINFO(fishing_event_info)
- DWORD pid;
- int step;
- DWORD hang_time;
- int fish_id;
- fishing_event_info()
- void Initialize();
- LPEVENT CreateFishingEvent(LPCHARACTER ch);
- void Take(fishing_event_info* info, LPCHARACTER ch);
- void Simulation(int level, int count, int map_grade, LPCHARACTER ch);
- void UseFish(LPCHARACTER ch, LPITEM item);
- void Grill(LPCHARACTER ch, LPITEM item);
- bool RefinableRod(LPITEM rod);
- int RealRefineRod(LPCHARACTER ch, LPITEM rod);
- FSM.h
- class CFSM
- CState * m_pCurrentState; // Current State
- CState * m_pNewState; // New State
- CStateTemplate<CFSM> m_stateInitial; // Initial State
- CFSM();
- virtual void Update();
- bool IsState(CState &State) const;
- bool GotoState(CState &NewState);
- virtual void BeginStateInitial() {}
- virtual void StateInitial() {}
- virtual void EndStateInitial() {}
- gm.h
- void gm_insert(const char * name, BYTE level);
- BYTE gm_get_level(const char * name, const char * host = NULL, const char * account = NULL);
- void gm_host_insert(const char * host);
- void gm_new_clear();
- void gm_new_insert( const tAdminInfo & c_rInfo );
- void gm_new_host_inert( const char * host );
- group_text_parse_tree.h
- class CGroupNode
- class CGroupNodeRow
- CGroupNodeRow(CGroupNode* pGroupNode, TTokenVector& vec_values);
- template <typename T>
- bool GetValue(const std::string & stColKey, OUT T& value) const;
- template <typename T>
- bool GetValue(int idx, OUT T& value) const;
- int GetSize() const;
- CGroupNode* m_pOwnerGroupNode;
- TTokenVector m_vec_values;
- CGroupNode();
- bool Load(const char * c_szFileName);
- const char * GetFileName();
- DWORD GetChildNodeCount();
- bool SetChildNode(const char * c_szKey, CGroupNode* pChildNode);
- CGroupNode* GetChildNode(const std::string & c_rstrKey) const;
- std::string GetNodeName() const;
- bool IsToken(const std::string & c_rstrKey) const;
- int GetRowCount();
- bool GetValue(size_t i, const std::string & c_rstrColKey, T& tValue) const;
- bool GetValue(const std::string & c_rstrRowKey, const std::string & c_rstrColKey, T& tValue) const;
- bool GetValue(const std::string & c_rstrRowKey, int index, T& tValue) const;
- bool GetRow(const std::string & c_rstrKey, OUT const CGroupNodeRow ** ppRow) const;
- bool GetRow(int idx, OUT const CGroupNodeRow ** ppRow) const;
- bool GetGroupRow(const std::string& stGroupName, const std::string& stRow, OUT const CGroupNode::CGroupNodeRow ** ppRow) const;
- bool GetGroupValue(const std::string& stGroupName, const std::string& stRow, int iCol, OUT T& tValue) const;
- bool GetGroupValue(const std::string& stGroupName, const std::string& stRow, const std::string& stCol, OUT T& tValue) const;
- int GetColumnIndexFromName(const std::string& stName) const;
- std::map <std::string, CGroupNode*> TMapGroup;
- std::map <std::string, CGroupNode::CGroupNodeRow> TMapRow;
- TMapGroup m_mapChildNodes;
- std::string strGroupName;
- TMapNameToIndex m_map_columnNameToIndex;
- TMapRow m_map_rows;
- friend class CGroupTextParseTreeLoader;
- class CGroupTextParseTreeLoader
- CGroupTextParseTreeLoader();
- bool Load(const char * c_szFileName);
- const char * GetFileName();
- CGroupNode* GetGroup(const char * c_szGroupName);
- bool LoadGroup(CGroupNode * pGroupNode);
- CGroupNode * m_pRootGroupNode;
- std::string m_strFileName;
- DWORD m_dwcurLineIndex;
- CMemoryTextFileLoader m_fileLoader;
- bool from_string(OUT T& t, IN const std::string& s)
- bool from_string <BYTE>(OUT BYTE& t, IN const std::string& s)
- bool CGroupNode::GetValue(size_t i, const std::string & c_rstrColKey, T& tValue)
- bool CGroupNode::GetValue(const std::string & c_rstrRowKey, const std::string & c_rstrColKey, T& tValue)
- bool CGroupNode::GetValue(const std::string & c_rstrRowKey, int index, T& tValue)
- bool CGroupNode::GetGroupValue(const std::string& stGroupName, const std::string& stRow, int iCol, OUT T& tValue)
- bool CGroupNode::CGroupNodeRow::GetValue(const std::string & stColKey, OUT T& value)
- bool CGroupNode::CGroupNodeRow::GetValue(int idx, OUT T& value)
- guild.h
- enum
- GUILD_GRADE_NAME_MAX_LEN = 8,
- GUILD_GRADE_COUNT = 15,
- GUILD_COMMENT_MAX_COUNT = 12,
- GUILD_COMMENT_MAX_LEN = 50,
- GUILD_LEADER_GRADE = 1,
- GUILD_BASE_POWER = 400,
- GUILD_POWER_PER_SKILL_LEVEL = 200,
- GUILD_POWER_PER_LEVEL = 100,
- GUILD_MINIMUM_LEADERSHIP = 40,
- GUILD_WAR_MIN_MEMBER_COUNT = 8,
- GUILD_LADDER_POINT_PER_LEVEL = 1000,
- GUILD_CREATE_ITEM_VNUM = 70101,
- struct SGuildMaster
- DWORD pid;
- struct SGuildMember
- DWORD pid;
- BYTE grade;
- BYTE is_general;
- BYTE job;
- BYTE level;
- DWORD offer_exp;
- BYTE _dummy;
- std::string name;
- SGuildMember(LPCHARACTER ch, BYTE grade, DWORD offer_exp);
- SGuildMember(DWORD pid, BYTE grade, BYTE is_general, BYTE job, BYTE level, DWORD offer_exp, char* name);
- struct SGuildMemberPacketData
- DWORD pid;
- BYTE grade;
- BYTE is_general;
- BYTE job;
- BYTE level;
- DWORD offer;
- BYTE name_flag;
- char name[CHARACTER_NAME_MAX_LEN+1];
- struct packet_guild_sub_info
- WORD member_count;
- WORD max_member_count;
- DWORD guild_id;
- DWORD master_pid;
- DWORD exp;
- BYTE level;
- char name[GUILD_NAME_MAX_LEN+1];
- DWORD gold;
- BYTE has_land;
- struct SGuildGrade
- char grade_name[GUILD_GRADE_NAME_MAX_LEN+1];
- BYTE auth_flag;
- struct TOneGradeNamePacket
- BYTE grade;
- char grade_name[GUILD_GRADE_NAME_MAX_LEN+1];
- struct TOneGradeAuthPacket
- BYTE grade;
- BYTE auth;
- enum
- GUILD_AUTH_ADD_MEMBER = (1 << 0),
- GUILD_AUTH_REMOVE_MEMBER = (1 << 1),
- GUILD_AUTH_NOTICE = (1 << 2),
- GUILD_AUTH_USE_SKILL = (1 << 3),
- struct SGuildData
- DWORD guild_id;
- DWORD master_pid;
- DWORD exp;
- BYTE level;
- char name[GUILD_NAME_MAX_LEN+1];
- TGuildGrade grade_array[GUILD_GRADE_COUNT];
- BYTE skill_point;
- BYTE abySkill[GUILD_SKILL_COUNT];
- int power;
- int max_power;
- int ladder_point;
- int win;
- int draw;
- int loss;
- int gold;
- struct TGuildCreateParameter
- LPCHARACTER master;
- char name[GUILD_NAME_MAX_LEN+1];
- struct SGuildWar
- DWORD war_start_time;
- DWORD score;
- DWORD state;
- BYTE type;
- DWORD map_index;
- SGuildWar(BYTE type): war_start_time(0),
- score(0),
- state(GUILD_WAR_RECV_DECLARE),
- type(type),
- map_index(0)
- bool IsWarBegin()
- class CGuild
- CGuild(TGuildCreateParameter& cp);
- explicit CGuild(DWORD guild_id) { Load(guild_id); }
- DWORD GetID() const { return m_data.guild_id; }
- const char* GetName() const { return m_data.name; }
- int GetSP() const { return m_data.power; }
- int GetMaxSP() { return m_data.max_power; }
- DWORD GetMasterPID() const { return m_data.master_pid; }
- LPCHARACTER GetMasterCharacter();
- BYTE GetLevel() const { return m_data.level; }
- void Reset() { m_data.power = m_data.max_power; }
- void RequestDisband(DWORD pid);
- void Disband();
- void RequestAddMember(LPCHARACTER ch, int grade = 15);
- void AddMember(TPacketDGGuildMember * p);
- bool RequestRemoveMember(DWORD pid);
- bool RemoveMember(DWORD pid);
- void LoginMember(LPCHARACTER ch);
- void P2PLoginMember(DWORD pid);
- void LogoutMember(LPCHARACTER ch);
- void P2PLogoutMember(DWORD pid);
- void ChangeMemberGrade(DWORD pid, BYTE grade);
- bool OfferExp(LPCHARACTER ch, int amount);
- void LevelChange(DWORD pid, BYTE level);
- void ChangeMemberData(DWORD pid, DWORD offer, BYTE level, BYTE grade);
- void ChangeGradeName(BYTE grade, const char* grade_name);
- void ChangeGradeAuth(BYTE grade, BYTE auth);
- void P2PChangeGrade(BYTE grade);
- bool ChangeMemberGeneral(DWORD pid, BYTE is_general);
- bool ChangeMasterTo(DWORD dwPID);
- void Packet(const void* buf, int size);
- void SendOnlineRemoveOnePacket(DWORD pid);
- void SendAllGradePacket(LPCHARACTER ch);
- void SendListPacket(LPCHARACTER ch);
- void SendListOneToAll(DWORD pid);
- void SendListOneToAll(LPCHARACTER ch);
- void SendLoginPacket(LPCHARACTER ch, LPCHARACTER chLogin);
- void SendLogoutPacket(LPCHARACTER ch, LPCHARACTER chLogout);
- void SendLoginPacket(LPCHARACTER ch, DWORD pid);
- void SendLogoutPacket(LPCHARACTER ch, DWORD pid);
- void SendGuildInfoPacket(LPCHARACTER ch);
- void SendGuildDataUpdateToAllMember(SQLMsg* pmsg);
- void Load(DWORD guild_id);
- void SaveLevel();
- void SaveSkill();
- void SaveMember(DWORD pid);
- int GetMaxMemberCount();
- int GetMemberCount() { return m_member.size(); }
- int GetTotalLevel() const;
- void SetMemberCountBonus(int iBonus);
- void BroadcastMemberCountBonus();
- int GetMaxGeneralCount() const { return 1;}
- int GetGeneralCount() const { return m_general_count; }
- TGuildMember* GetMember(DWORD pid);
- DWORD GetMemberPID(const std::string& strName);
- bool HasGradeAuth(int grade, int auth_flag) const { return (bool)(m_data.grade_array[grade-1].auth_flag & auth_flag);}
- void AddComment(LPCHARACTER ch, const std::string& str);
- void DeleteComment(LPCHARACTER ch, DWORD comment_id);
- void RefreshComment(LPCHARACTER ch);
- void RefreshCommentForce(DWORD player_id);
- int GetSkillLevel(DWORD vnum);
- void SkillLevelUp(DWORD dwVnum);
- void UseSkill(DWORD dwVnum, LPCHARACTER ch, DWORD pid);
- void SendSkillInfoPacket(LPCHARACTER ch) const;
- void ComputeGuildPoints();
- void GuildPointChange( BYTE type, int amount, bool save = false );
- void UpdateSkill(BYTE grade, BYTE* skill_levels);
- void SendDBSkillUpdate(int amount = 0);
- void SkillRecharge();
- bool ChargeSP(LPCHARACTER ch, int iSP);
- void Chat(const char* c_pszText);
- void P2PChat(const char* c_pszText);
- void SkillUsableChange(DWORD dwSkillVnum, bool bUsable);
- void AdvanceLevel(int iLevel);
- void RequestDepositMoney(LPCHARACTER ch, int iGold);
- void RequestWithdrawMoney(LPCHARACTER ch, int iGold);
- void RecvMoneyChange(int iGold);
- void RecvWithdrawMoneyGive(int iChangeGold);
- int GetGuildMoney() const { return m_data.gold; }
- void GuildWarPacket(DWORD guild_id, BYTE bWarType, BYTE bWarState);
- void SendEnemyGuild(LPCHARACTER ch);
- int GetGuildWarState(DWORD guild_id);
- bool CanStartWar(BYTE bGuildWarType);
- DWORD GetWarStartTime(DWORD guild_id);
- bool UnderWar(DWORD guild_id);
- DWORD UnderAnyWar(BYTE bType = GUILD_WAR_TYPE_MAX_NUM);
- void SetGuildWarMapIndex(DWORD dwGuildID, long lMapIndex);
- int GetGuildWarType(DWORD dwGuildOpponent);
- DWORD GetGuildWarMapIndex(DWORD dwGuildOpponent);
- void GuildWarEntryAsk(DWORD guild_opp);
- void GuildWarEntryAccept(DWORD guild_opp, LPCHARACTER ch);
- void NotifyGuildMaster(const char* msg);
- void RequestDeclareWar(DWORD guild_id, BYTE type);
- void RequestRefuseWar(DWORD guild_id);
- bool DeclareWar(DWORD guild_id, BYTE type, BYTE state);
- void RefuseWar(DWORD guild_id);
- bool WaitStartWar(DWORD guild_id);
- bool CheckStartWar(DWORD guild_id);
- void StartWar(DWORD guild_id);
- void EndWar(DWORD guild_id);
- void ReserveWar(DWORD guild_id, BYTE type);
- void SetWarScoreAgainstTo(DWORD guild_opponent, int newpoint);
- int GetWarScoreAgainstTo(DWORD guild_opponent);
- int GetLadderPoint() const { return m_data.ladder_point; }
- void SetLadderPoint(int point);
- void SetWarData(int iWin, int iDraw, int iLoss) { m_data.win = iWin, m_data.draw = iDraw, m_data.loss = iLoss; }
- void ChangeLadderPoint(int iChange);
- int GetGuildWarWinCount() const { return m_data.win; }
- int GetGuildWarDrawCount() const { return m_data.draw; }
- int GetGuildWarLossCount() const { return m_data.loss; }
- bool HasLand();
- void Invite( LPCHARACTER pchInviter, LPCHARACTER pchInvitee );
- void InviteAccept( LPCHARACTER pchInvitee );
- void InviteDeny( DWORD dwPID );
- void Initialize();
- TGuildData m_data;
- int m_general_count;
- int m_iMemberCountBonus;
- std::map<DWORD, TGuildMember> TGuildMemberContainer;
- TGuildMemberContainer m_member;
- CHARACTER_SET TGuildMemberOnlineContainer;
- TGuildMemberOnlineContainer m_memberOnline;
- std::set<DWORD> TGuildMemberP2POnlineContainer;
- TGuildMemberP2POnlineContainer m_memberP2POnline;
- void LoadGuildData(SQLMsg* pmsg);
- void LoadGuildGradeData(SQLMsg* pmsg);
- void LoadGuildMemberData(SQLMsg* pmsg);
- void __P2PUpdateGrade(SQLMsg* pmsg);
- std::map<DWORD, TGuildWar> TEnemyGuildContainer;
- TEnemyGuildContainer m_EnemyGuild;
- std::map<DWORD, DWORD> m_mapGuildWarEndTime;
- bool abSkillUsable[GUILD_SKILL_COUNT];
- enum GuildJoinErrCode
- GERR_NONE = 0,
- GERR_WITHDRAWPENALTY,
- GERR_COMMISSIONPENALTY,
- GERR_ALREADYJOIN,
- GERR_GUILDISFULL,
- GERR_GUILD_IS_IN_WAR,
- GERR_INVITE_LIMIT,
- GERR_MAX
- GuildJoinErrCode VerifyGuildJoinableCondition( const LPCHARACTER pchInvitee );
- std::map< DWORD, LPEVENT > EventMap;
- EventMap m_GuildInviteEventMap;
- int m_guildPostCommentPulse;
- guild_manager.h
- class CGuild;
- struct TGuildCreateParameter;
- class CGuildWarReserveForGame
- TGuildWarReserve data;
- std::map<std::string, std::pair<DWORD, DWORD> > mapBet;
- class CGuildManager : public singleton<CGuildManager>
- CGuildManager();
- DWORD CreateGuild(TGuildCreateParameter& gcp);
- CGuild * FindGuild(DWORD guild_id);
- CGuild * FindGuildByName(const std::string guild_name);
- void LoadGuild(DWORD guild_id);
- CGuild * TouchGuild(DWORD guild_id);
- void DisbandGuild(DWORD guild_id);
- void Initialize();
- void Link(DWORD pid, CGuild* guild);
- void Unlink(DWORD pid);
- CGuild * GetLinkedGuild(DWORD pid);
- void LoginMember(LPCHARACTER ch);
- void P2PLoginMember(DWORD pid);
- void P2PLogoutMember(DWORD pid);
- void SkillRecharge();
- void ShowGuildWarList(LPCHARACTER ch);
- void SendGuildWar(LPCHARACTER ch);
- void RequestEndWar(DWORD guild_id1, DWORD guild_id2);
- void RequestCancelWar(DWORD guild_id1, DWORD guild_id2);
- void RequestWarOver(DWORD dwGuild1, DWORD dwGuild2, DWORD dwGuildWinner, long lReward);
- void DeclareWar(DWORD guild_id1, DWORD guild_id2, BYTE bType);
- void RefuseWar(DWORD guild_id1, DWORD guild_id2);
- void StartWar(DWORD guild_id1, DWORD guild_id2);
- void WaitStartWar(DWORD guild_id1, DWORD guild_id2);
- void WarOver(DWORD guild_id1, DWORD guild_id2, bool bDraw);
- void CancelWar(DWORD guild_id1, DWORD guild_id2);
- bool EndWar(DWORD guild_id1, DWORD guild_id2);
- void ReserveWar(DWORD dwGuild1, DWORD dwGuild2, BYTE bType);
- void ReserveWarAdd(TGuildWarReserve * p);
- void ReserveWarDelete(DWORD dwID);
- std::vector<CGuildWarReserveForGame *> & GetReserveWarRef();
- void ReserveWarBet(TPacketGDGuildWarBet * p);
- bool IsBet(DWORD dwID, const char * c_pszLogin);
- void StopAllGuildWar();
- void Kill(LPCHARACTER killer, LPCHARACTER victim);
- int GetRank(CGuild* g);
- void GetHighRankString(DWORD dwMyGuild, char * buffer, size_t buflen);
- void GetAroundRankString(DWORD dwMyGuild, char * buffer, size_t buflen);
- template <typename Func> void for_each_war(Func & f);
- int GetDisbandDelay();
- int GetWithdrawDelay();
- void ChangeMaster(DWORD dwGID);
- std::map<DWORD, CGuild*> TGuildMap;
- TGuildMap m_mapGuild;
- std::set<std::pair<DWORD, DWORD> > TGuildWarContainer;
- TGuildWarContainer m_GuildWar;
- std::map<std::pair<DWORD, DWORD>, DWORD> TGuildWarEndTimeContainer;
- TGuildWarEndTimeContainer m_GuildWarEndTime;
- TGuildMap m_map_pkGuildByPID;
- std::map<DWORD, CGuildWarReserveForGame *> m_map_kReserveWar;
- std::vector<CGuildWarReserveForGame *> m_vec_kReserveWar;
- template <typename Func> void CGuildManager::for_each_war(Func & f)
- void SendGuildWarScore(DWORD dwGuild, DWORD dwGuildOpp, int iDelta, int iBetScoreDelta = 0);
- horse_rider.h
- const int HORSE_MAX_LEVEL = 30;
- struct THorseStat
- int iMinLevel;
- int iNPCRace;
- int iMaxHealth;
- int iMaxStamina;
- int iST;
- int iDX;
- int iHT;
- int iIQ;
- int iDamMean;
- int iDamMin;
- int iDamMax;
- int iArmor;
- THorseStat c_aHorseStat[HORSE_MAX_LEVEL+1];
- class CHorseRider
- CHorseRider();
- BYTE GetHorseLevel() const { return m_Horse.bLevel; }
- BYTE GetHorseGrade();
- short GetHorseHealth() const { return m_Horse.sHealth; }
- short GetHorseStamina() const { return m_Horse.sStamina; }
- short GetHorseMaxHealth();
- short GetHorseMaxStamina();
- int GetHorseST() { return c_aHorseStat[GetHorseLevel()].iST; }
- int GetHorseDX() { return c_aHorseStat[GetHorseLevel()].iDX; }
- int GetHorseHT() { return c_aHorseStat[GetHorseLevel()].iHT; }
- int GetHorseIQ() { return c_aHorseStat[GetHorseLevel()].iIQ; }
- int GetHorseArmor() { return c_aHorseStat[GetHorseLevel()].iArmor; }
- virtual bool ReviveHorse();
- void FeedHorse();
- virtual void HorseDie();
- bool IsHorseRiding() const { return m_Horse.bRiding; }
- void ResetHorseHealthDropTime();
- virtual void SetHorseLevel(int iLevel);
- void EnterHorse();
- virtual void SendHorseInfo() {}
- virtual void ClearHorseInfo() {}
- virtual void UpdateRideTime(int interval) {}
- void SetHorseData(const THorseInfo& crInfo);
- const THorseInfo& GetHorseData() const { return m_Horse; }
- void UpdateHorseDataByLogoff(DWORD dwLogoffTime);
- virtual bool StartRiding();
- virtual bool StopRiding();
- virtual DWORD GetMyHorseVnum() const { return 20030; }
- void UpdateHorseStamina(int iStamina, bool bSend = true);
- void StartStaminaConsumeEvent();
- void StartStaminaRegenEvent();
- void UpdateHorseHealth(int iHealth, bool bSend = true);
- void CheckHorseHealthDropTime(bool bSend = true);
- void Initialize();
- void Destroy();
- THorseInfo m_Horse;
- LPEVENT m_eventStaminaRegen;
- LPEVENT m_eventStaminaConsume;
- friend EVENTFUNC(horse_stamina_regen_event);
- friend EVENTFUNC(horse_stamina_consume_event);
- friend ACMD(do_horse_set_stat);
- horsename_manager.h
- class CHorseNameManager : public singleton<CHorseNameManager>
- std::map<DWORD, std::string> m_mapHorseNames;
- void BroadcastHorseName(DWORD dwPlayerID, const char* szHorseName);
- CHorseNameManager();
- const char* GetHorseName(DWORD dwPlayerID);
- void UpdateHorseName(DWORD dwPlayerID, const char* szHorseName, bool broadcast=false);
- void Validate(LPCHARACTER pChar);
- IFileMonitor.h
- enum eFileUpdatedOptions
- e_FileUpdate_None = -1,
- e_FileUpdate_Error,
- e_FileUpdate_Deleted,
- e_FileUpdate_Modified,
- e_FileUpdate_AttrModified,
- e_FileUpdate_Linked,
- e_FileUpdate_Renamed,
- e_FileUpdate_Revoked,
- void (* PFN_FileChangeListener )(const std::string&, eFileUpdatedOptions);
- struct IFileMonitor
- virtual void Update (DWORD dwPulses) = 0;
- virtual void AddWatch (const std::string& strFileName, PFN_FileChangeListener pListenerFunc) = 0;
- input.h
- enum
- INPROC_CLOSE,
- INPROC_HANDSHAKE,
- INPROC_LOGIN,
- INPROC_MAIN,
- INPROC_DEAD,
- INPROC_DB,
- INPROC_UDP,
- INPROC_P2P,
- INPROC_AUTH,
- void LoginFailure(LPDESC d, const char * c_pszStatus);
- class CInputProcessor
- CInputProcessor();
- virtual bool Process(LPDESC d, const void * c_pvOrig, int iBytes, int & r_iBytesProceed);
- virtual BYTE GetType() = 0;
- void BindPacketInfo(CPacketInfo * pPacketInfo);
- void Pong(LPDESC d);
- void Handshake(LPDESC d, const char * c_pData);
- void Version(LPCHARACTER ch, const char* c_pData);
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData) = 0;
- CPacketInfo * m_pPacketInfo;
- int m_iBufferLeft;
- CPacketInfoCG m_packetInfoCG;
- class CInputClose : public CInputProcessor
- virtual BYTE GetType() { return INPROC_CLOSE; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData) { return m_iBufferLeft; }
- class CInputHandshake : public CInputProcessor
- CInputHandshake();
- virtual BYTE GetType() { return INPROC_HANDSHAKE; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void GuildMarkLogin(LPDESC d, const char* c_pData);
- CPacketInfo * m_pMainPacketInfo;
- class CInputLogin : public CInputProcessor
- virtual BYTE GetType() { return INPROC_LOGIN; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void Login(LPDESC d, const char * data);
- void LoginByKey(LPDESC d, const char * data);
- void CharacterSelect(LPDESC d, const char * data);
- void CharacterCreate(LPDESC d, const char * data);
- void CharacterDelete(LPDESC d, const char * data);
- void Entergame(LPDESC d, const char * data);
- void Empire(LPDESC d, const char * c_pData);
- void GuildMarkCRCList(LPDESC d, const char* c_pData);
- void GuildMarkIDXList(LPDESC d, const char* c_pData);
- void GuildMarkUpload(LPDESC d, const char* c_pData);
- int GuildSymbolUpload(LPDESC d, const char* c_pData, size_t uiBytes);
- void GuildSymbolCRC(LPDESC d, const char* c_pData);
- void ChangeName(LPDESC d, const char * data);
- class CInputMain : public CInputProcessor
- virtual BYTE GetType() { return INPROC_MAIN; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void Attack(LPCHARACTER ch, const BYTE header, const char* data);
- int Whisper(LPCHARACTER ch, const char * data, size_t uiBytes);
- int Chat(LPCHARACTER ch, const char * data, size_t uiBytes);
- void ItemUse(LPCHARACTER ch, const char * data);
- void ItemDrop(LPCHARACTER ch, const char * data);
- void ItemDrop2(LPCHARACTER ch, const char * data);
- void ItemDestroy(LPCHARACTER ch, const char * data);
- void ItemMove(LPCHARACTER ch, const char * data);
- void ItemPickup(LPCHARACTER ch, const char * data);
- void ItemToItem(LPCHARACTER ch, const char * pcData);
- void QuickslotAdd(LPCHARACTER ch, const char * data);
- void QuickslotDelete(LPCHARACTER ch, const char * data);
- void QuickslotSwap(LPCHARACTER ch, const char * data);
- int Shop(LPCHARACTER ch, const char * data, size_t uiBytes);
- void OnClick(LPCHARACTER ch, const char * data);
- void Exchange(LPCHARACTER ch, const char * data);
- void Position(LPCHARACTER ch, const char * data);
- void Move(LPCHARACTER ch, const char * data);
- int SyncPosition(LPCHARACTER ch, const char * data, size_t uiBytes);
- void FlyTarget(LPCHARACTER ch, const char * pcData, BYTE bHeader);
- void UseSkill(LPCHARACTER ch, const char * pcData);
- void ScriptAnswer(LPCHARACTER ch, const void * pvData);
- void ScriptButton(LPCHARACTER ch, const void * pvData);
- void ScriptSelectItem(LPCHARACTER ch, const void * pvData);
- void QuestInputString(LPCHARACTER ch, const void * pvData);
- void QuestConfirm(LPCHARACTER ch, const void* pvData);
- void Target(LPCHARACTER ch, const char * pcData);
- void Warp(LPCHARACTER ch, const char * pcData);
- void SafeboxCheckin(LPCHARACTER ch, const char * c_pData);
- void SafeboxCheckout(LPCHARACTER ch, const char * c_pData, bool bMall);
- void SafeboxItemMove(LPCHARACTER ch, const char * data);
- int Messenger(LPCHARACTER ch, const char* c_pData, size_t uiBytes);
- void PartyInvite(LPCHARACTER ch, const char * c_pData);
- void PartyInviteAnswer(LPCHARACTER ch, const char * c_pData);
- void PartyRemove(LPCHARACTER ch, const char * c_pData);
- void PartySetState(LPCHARACTER ch, const char * c_pData);
- void PartyUseSkill(LPCHARACTER ch, const char * c_pData);
- void PartyParameter(LPCHARACTER ch, const char * c_pData);
- int Guild(LPCHARACTER ch, const char * data, size_t uiBytes);
- void AnswerMakeGuild(LPCHARACTER ch, const char* c_pData);
- void Fishing(LPCHARACTER ch, const char* c_pData);
- void ItemGive(LPCHARACTER ch, const char* c_pData);
- void Hack(LPCHARACTER ch, const char * c_pData);
- int MyShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes);
- void Refine(LPCHARACTER ch, const char* c_pData);
- void Roulette(LPCHARACTER ch, const char* c_pData);
- class CInputDead : public CInputMain
- virtual BYTE GetType() { return INPROC_DEAD; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- class CInputDB : public CInputProcessor
- virtual bool Process(LPDESC d, const void * c_pvOrig, int iBytes, int & r_iBytesProceed);
- virtual BYTE GetType() { return INPROC_DB; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void MapLocations(const char * c_pData);
- void LoginSuccess(DWORD dwHandle, const char *data);
- void PlayerCreateFailure(LPDESC d, BYTE bType);
- void PlayerDeleteSuccess(LPDESC d, const char * data);
- void PlayerDeleteFail(LPDESC d);
- void PlayerLoad(LPDESC d, const char* data);
- void PlayerCreateSuccess(LPDESC d, const char * data);
- void Boot(const char* data);
- void QuestLoad(LPDESC d, const char * c_pData);
- void SafeboxLoad(LPDESC d, const char * c_pData);
- void SafeboxChangeSize(LPDESC d, const char * c_pData);
- void SafeboxWrongPassword(LPDESC d);
- void SafeboxChangePasswordAnswer(LPDESC d, const char* c_pData);
- void MallLoad(LPDESC d, const char * c_pData);
- void EmpireSelect(LPDESC d, const char * c_pData);
- void P2P(const char * c_pData);
- void ItemLoad(LPDESC d, const char * c_pData);
- void AffectLoad(LPDESC d, const char * c_pData);
- void GuildLoad(const char * c_pData);
- void GuildSkillUpdate(const char* c_pData);
- void GuildSkillRecharge();
- void GuildExpUpdate(const char* c_pData);
- void GuildAddMember(const char* c_pData);
- void GuildRemoveMember(const char* c_pData);
- void GuildChangeGrade(const char* c_pData);
- void GuildChangeMemberData(const char* c_pData);
- void GuildDisband(const char* c_pData);
- void GuildLadder(const char* c_pData);
- void GuildWar(const char* c_pData);
- void GuildWarScore(const char* c_pData);
- void GuildSkillUsableChange(const char* c_pData);
- void GuildMoneyChange(const char* c_pData);
- void GuildWithdrawMoney(const char* c_pData);
- void GuildWarReserveAdd(TGuildWarReserve * p);
- void GuildWarReserveUpdate(TGuildWarReserve * p);
- void GuildWarReserveDelete(DWORD dwID);
- void GuildWarBet(TPacketGDGuildWarBet * p);
- void GuildChangeMaster(TPacketChangeGuildMaster* p);
- void LoginAlready(LPDESC d, const char * c_pData);
- void PartyCreate(const char* c_pData);
- void PartyDelete(const char* c_pData);
- void PartyAdd(const char* c_pData);
- void PartyRemove(const char* c_pData);
- void PartyStateChange(const char* c_pData);
- void PartySetMemberLevel(const char* c_pData);
- void Time(const char * c_pData);
- void ReloadProto(const char * c_pData);
- void ChangeName(LPDESC d, const char * data);
- void AuthLogin(LPDESC d, const char * c_pData);
- void AuthLoginOpenID(LPDESC d, const char * c_pData);
- void ItemAward(const char * c_pData);
- void ChangeEmpirePriv(const char* c_pData);
- void ChangeGuildPriv(const char* c_pData);
- void ChangeCharacterPriv(const char* c_pData);
- void MoneyLog(const char* c_pData);
- void SetEventFlag(const char* c_pData);
- void BillingRepair(const char * c_pData);
- void BillingExpire(const char * c_pData);
- void BillingLogin(const char * c_pData);
- void BillingCheck(const char * c_pData);
- void VCard(const char * c_pData);
- void CreateObject(const char * c_pData);
- void DeleteObject(const char * c_pData);
- void UpdateLand(const char * c_pData);
- void Notice(const char * c_pData);
- void MarriageAdd(TPacketMarriageAdd * p);
- void MarriageUpdate(TPacketMarriageUpdate * p);
- void MarriageRemove(TPacketMarriageRemove * p);
- void WeddingRequest(TPacketWeddingRequest* p);
- void WeddingReady(TPacketWeddingReady* p);
- void WeddingStart(TPacketWeddingStart* p);
- void WeddingEnd(TPacketWeddingEnd* p);
- void MyshopPricelistRes( LPDESC d, const TPacketMyshopPricelistHeader* p );
- void ReloadAdmin( const char * c_pData );
- void DetailLog(const TPacketNeedLoginLogInfo* info);
- void ItemAwardInformer(TPacketItemAwardInfromer* data);
- void RespondChannelStatus(LPDESC desc, const char* pcData);
- DWORD m_dwHandle;
- class CInputUDP : public CInputProcessor
- CInputUDP();
- virtual bool Process(LPDESC d, const void * c_pvOrig, int iBytes, int & r_iBytesProceed);
- virtual BYTE GetType() { return INPROC_UDP; }
- void SetSockAddr(struct sockaddr_in & rSockAddr) { m_SockAddr = rSockAddr; };
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void Handshake(LPDESC lpDesc, const char * c_pData);
- void StateChecker(const char * c_pData);
- struct sockaddr_in m_SockAddr;
- CPacketInfoUDP m_packetInfoUDP;
- class CInputP2P : public CInputProcessor
- CInputP2P();
- virtual BYTE GetType() { return INPROC_P2P; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- void Setup(LPDESC d, const char * c_pData);
- void Login(LPDESC d, const char * c_pData);
- void Logout(LPDESC d, const char * c_pData);
- int Relay(LPDESC d, const char * c_pData, size_t uiBytes);
- int Notice(LPDESC d, const char * c_pData, size_t uiBytes);
- int Guild(LPDESC d, const char* c_pData, size_t uiBytes);
- void Shout(const char * c_pData);
- void Disconnect(const char * c_pData);
- void MessengerAdd(const char * c_pData);
- void MessengerRemove(const char * c_pData);
- void FindPosition(LPDESC d, const char* c_pData);
- void WarpCharacter(const char* c_pData);
- void GuildWarZoneMapIndex(const char* c_pData);
- void Transfer(const char * c_pData);
- void XmasWarpSanta(const char * c_pData);
- void XmasWarpSantaReply(const char * c_pData);
- void LoginPing(LPDESC d, const char * c_pData);
- void BlockChat(const char * c_pData);
- void IamAwake(LPDESC d, const char * c_pData);
- CPacketInfoGG m_packetInfoGG;
- class CInputAuth : public CInputProcessor
- CInputAuth();
- virtual BYTE GetType() { return INPROC_AUTH; }
- virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData);
- int auth_OpenID(const char *authKey, const char *ipAddr, char *rID);
- void Login(LPDESC d, const char * c_pData);
- void LoginOpenID(LPDESC d, const char * c_pData);
- ip_ban.h
- bool LoadBanIP(const char * filename);
- bool IsBanIP(struct in_addr in);
- item.h
- class CItem : public CEntity
- virtual void EncodeInsertPacket(LPENTITY entity);
- virtual void EncodeRemovePacket(LPENTITY entity);
- CItem(DWORD dwVnum);
- int GetLevelLimit();
- bool CheckItemUseLevel(int nLevel);
- long FindApplyValue(BYTE bApplyType);
- bool IsStackable() { return (GetFlag() & ITEM_FLAG_STACKABLE)?true:false; }
- void Initialize();
- void Destroy();
- void Save();
- void SetWindow(BYTE b) { m_bWindow = b; }
- BYTE GetWindow() { return m_bWindow; }
- void SetID(DWORD id) { m_dwID = id; }
- DWORD GetID() { return m_dwID; }
- void SetProto(const TItemTable * table);
- TItemTable const * GetProto() { return m_pProto; }
- int GetGold();
- int GetShopBuyPrice();
- const char * GetName() { return m_pProto ? m_pProto->szLocaleName : NULL; }
- const char * GetBaseName() { return m_pProto ? m_pProto->szName : NULL; }
- BYTE GetSize() { return m_pProto ? m_pProto->bSize : 0; }
- void SetFlag(long flag) { m_lFlag = flag; }
- long GetFlag() { return m_lFlag; }
- void AddFlag(long bit);
- void RemoveFlag(long bit);
- DWORD GetWearFlag() { return m_pProto ? m_pProto->dwWearFlags : 0; }
- DWORD GetAntiFlag() { return m_pProto ? m_pProto->dwAntiFlags : 0; }
- DWORD GetImmuneFlag() { return m_pProto ? m_pProto->dwImmuneFlag : 0; }
- DWORD GetRealImmuneFlag();
- void SetVID(DWORD vid) { m_dwVID = vid; }
- DWORD GetVID() { return m_dwVID; }
- bool SetCount(DWORD count);
- DWORD GetCount();
- DWORD GetVnum() const { return m_dwMaskVnum ? m_dwMaskVnum : m_dwVnum; }
- DWORD GetOriginalVnum() const { return m_dwVnum; }
- BYTE GetType() const { return m_pProto ? m_pProto->bType : 0; }
- BYTE GetSubType() const { return m_pProto ? m_pProto->bSubType : 0; }
- BYTE GetLimitType(DWORD idx) const { return m_pProto ? m_pProto->aLimits[idx].bType : 0; }
- long GetLimitValue(DWORD idx) const { return m_pProto ? m_pProto->aLimits[idx].lValue : 0; }
- long GetValue(DWORD idx);
- void SetCell(LPCHARACTER ch, WORD pos) { m_pOwner = ch, m_wCell = pos; }
- WORD GetCell() { return m_wCell; }
- LPITEM RemoveFromCharacter();
- bool AddToCharacter(LPCHARACTER ch, TItemPos Cell);
- LPCHARACTER GetOwner() { return m_pOwner; }
- LPITEM RemoveFromGround();
- bool AddToGround(long lMapIndex, const PIXEL_POSITION & pos, bool skipOwnerCheck = false);
- int FindEquipCell(LPCHARACTER ch, int bCandidateCell = -1);
- bool IsEquipped() const { return m_bEquipped; }
- bool EquipTo(LPCHARACTER ch, BYTE bWearCell);
- bool IsEquipable() const;
- bool CanUsedBy(LPCHARACTER ch);
- bool DistanceValid(LPCHARACTER ch);
- void UpdatePacket();
- void UsePacketEncode(LPCHARACTER ch, LPCHARACTER victim, struct packet_item_use * packet);
- void SetExchanging(bool isOn = true);
- bool IsExchanging() { return m_bExchanging; }
- bool IsTwohanded();
- bool IsPolymorphItem();
- void ModifyPoints(bool bAdd);
- bool CreateSocket(BYTE bSlot, BYTE bGold);
- const long * GetSockets() { return &m_alSockets[0]; }
- long GetSocket(int i) { return m_alSockets[i]; }
- void SetSockets(const long * al);
- void SetSocket(int i, long v, bool bLog = true);
- int GetSocketCount();
- bool AddSocket();
- const TPlayerItemAttribute* GetAttributes() { return m_aAttr; }
- const TPlayerItemAttribute& GetAttribute(int i) { return m_aAttr[i]; }
- BYTE GetAttributeType(int i) { return m_aAttr[i].bType; }
- short GetAttributeValue(int i){ return m_aAttr[i].sValue; }
- void SetAttributes(const TPlayerItemAttribute* c_pAttribute);
- int FindAttribute(BYTE bType);
- bool RemoveAttributeAt(int index);
- bool RemoveAttributeType(BYTE bType);
- bool HasAttr(BYTE bApply);
- bool HasRareAttr(BYTE bApply);
- void SetDestroyEvent(LPEVENT pkEvent);
- void StartDestroyEvent(int iSec=300);
- DWORD GetRefinedVnum() { return m_pProto ? m_pProto->dwRefinedVnum : 0; }
- DWORD GetRefineFromVnum();
- int GetRefineLevel();
- void SetSkipSave(bool b) { m_bSkipSave = b; }
- bool GetSkipSave() { return m_bSkipSave; }
- bool IsOwnership(LPCHARACTER ch);
- void SetOwnership(LPCHARACTER ch, int iSec = 10);
- void SetOwnershipEvent(LPEVENT pkEvent);
- DWORD GetLastOwnerPID() { return m_dwLastOwnerPID; }
- int GetAttributeSetIndex();
- void AlterToMagicItem();
- void AlterToSocketItem(int iSocketCount);
- WORD GetRefineSet() { return m_pProto ? m_pProto->wRefineSet : 0; }
- void StartUniqueExpireEvent();
- void SetUniqueExpireEvent(LPEVENT pkEvent);
- void StartTimerBasedOnWearExpireEvent();
- void SetTimerBasedOnWearExpireEvent(LPEVENT pkEvent);
- void StartRealTimeExpireEvent();
- bool IsRealTimeItem();
- void StopUniqueExpireEvent();
- void StopTimerBasedOnWearExpireEvent();
- void StopAccessorySocketExpireEvent();
- int GetDuration();
- int GetAttributeCount();
- void ClearAttribute();
- void ChangeAttribute(const int* aiChangeProb=NULL);
- void AddAttribute();
- void AddAttribute(BYTE bType, short sValue);
- void ApplyAddon(int iAddonType);
- int GetSpecialGroup() const;
- bool IsSameSpecialGroup(const LPITEM item) const;
- bool IsAccessoryForSocket();
- int GetAccessorySocketGrade();
- int GetAccessorySocketMaxGrade();
- int GetAccessorySocketDownGradeTime();
- void SetAccessorySocketGrade(int iGrade);
- void SetAccessorySocketMaxGrade(int iMaxGrade);
- void SetAccessorySocketDownGradeTime(DWORD time);
- void AccessorySocketDegrade();
- void StartAccessorySocketExpireEvent();
- void SetAccessorySocketExpireEvent(LPEVENT pkEvent);
- bool CanPutInto(LPITEM item);
- void CopyAttributeTo(LPITEM pItem);
- void CopySocketTo(LPITEM pItem);
- int GetRareAttrCount();
- bool AddRareAttribute();
- bool ChangeRareAttribute();
- void AttrLog();
- void Lock(bool f) { m_isLocked = f; }
- bool isLocked() const { return m_isLocked; }
- void SetAttribute(int i, BYTE bType, short sValue);
- void SetForceAttribute(int i, BYTE bType, short sValue);
- bool EquipEx(bool is_equip);
- bool Unequip();
- void AddAttr(BYTE bApply, BYTE bLevel);
- void PutAttribute(const int * aiAttrPercentTable);
- void PutAttributeWithLevel(BYTE bLevel);
- friend class CInputDB;
- bool OnAfterCreatedItem();
- bool IsRideItem();
- bool IsRamadanRing();
- void ClearMountAttributeAndAffect();
- bool IsNewMountItem();
- void SetMaskVnum(DWORD vnum) { m_dwMaskVnum = vnum; }
- DWORD GetMaskVnum() { return m_dwMaskVnum; }
- bool IsMaskedItem() { return m_dwMaskVnum != 0; }
- bool IsDragonSoul();
- int GiveMoreTime_Per(float fPercent);
- int GiveMoreTime_Fix(DWORD dwTime);
- TItemTable const * m_pProto;
- DWORD m_dwVnum;
- LPCHARACTER m_pOwner;
- BYTE m_bWindow;
- DWORD m_dwID;
- bool m_bEquipped;
- DWORD m_dwVID;
- WORD m_wCell;
- DWORD m_dwCount;
- long m_lFlag;
- DWORD m_dwLastOwnerPID;
- bool m_bExchanging;
- long m_alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute m_aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- LPEVENT m_pkDestroyEvent;
- LPEVENT m_pkExpireEvent;
- LPEVENT m_pkUniqueExpireEvent;
- LPEVENT m_pkTimerBasedOnWearExpireEvent;
- LPEVENT m_pkRealTimeExpireEvent;
- LPEVENT m_pkAccessorySocketExpireEvent;
- LPEVENT m_pkOwnershipEvent;
- DWORD m_dwOwnershipPID;
- bool m_bSkipSave;
- bool m_isLocked;
- DWORD m_dwMaskVnum;
- DWORD m_dwSIGVnum;
- void SetSIGVnum
- DWORD GetSIGVnum()
- EVENTINFO(item_event_info)
- LPITEM item;
- char szOwnerName[CHARACTER_NAME_MAX_LEN];
- item_event_info(): item( 0 )
- EVENTINFO(item_vid_event_info)
- DWORD item_vid;
- item_vid_event_info() : item_vid( 0 )
- item_addon.h
- class CItemAddonManager : public singleton<CItemAddonManager>
- CItemAddonManager();
- void ApplyAddonTo(int iAddonType, LPITEM pItem);
- item_manager.h
- class CSpecialAttrGroup
- CSpecialAttrGroup(DWORD vnum): m_dwVnum(vnum)
- struct CSpecialAttrInfo
- CSpecialAttrInfo (DWORD _apply_type, DWORD _apply_value): apply_type(_apply_type), apply_value(_apply_value)
- DWORD apply_type;
- DWORD apply_value;
- DWORD m_dwVnum;
- std::string m_stEffectFileName;
- std::vector<CSpecialAttrInfo> m_vecAttrs;
- class CSpecialItemGroup
- enum EGiveType
- NONE,
- GOLD,
- EXP,
- MOB,
- SLOW,
- DRAIN_HP,
- POISON,
- MOB_GROUP,
- enum ESIGType { NORMAL, PCT, QUEST, SPECIAL };
- struct CSpecialItemInfo
- DWORD vnum;
- int count;
- int rare;
- CSpecialItemInfo(DWORD _vnum, int _count, int _rare): vnum(_vnum), count(_count), rare(_rare)
- CSpecialItemGroup(DWORD vnum, BYTE type=0): m_dwVnum(vnum), m_bType(type)
- void AddItem(DWORD vnum, int count, int prob, int rare)
- bool IsEmpty()
- int GetMultiIndex(std::vector <int> &idx_vec) const
- int GetOneIndex() const
- int GetVnum(int idx) const
- int GetCount(int idx) const
- int GetRarePct(int idx) const
- bool Contains(DWORD dwVnum) const
- DWORD GetAttrVnum(DWORD dwVnum) const
- DWORD m_dwVnum;
- BYTE m_bType;
- std::vector<int> m_vecProbs;
- std::vector<CSpecialItemInfo> m_vecItems;
- class CMobItemGroup
- struct SMobItemGroupInfo
- DWORD dwItemVnum;
- int iCount;
- int iRarePct;
- SMobItemGroupInfo(DWORD dwItemVnum, int iCount, int iRarePct): dwItemVnum(dwItemVnum),
- iCount(iCount),
- iRarePct(iRarePct)
- CMobItemGroup(DWORD dwMobVnum, int iKillDrop, const std::string& r_stName):m_dwMobVnum(dwMobVnum),m_iKillDrop(iKillDrop),m_stName(r_stName)
- int GetKillPerDrop()
- void AddItem(DWORD dwItemVnum, int iCount, int iPartPct, int iRarePct)
- bool IsEmpty() const
- int GetOneIndex() const
- const SMobItemGroupInfo& GetOne() const
- DWORD m_dwMobVnum;
- int m_iKillDrop;
- std::string m_stName;
- std::vector<int> m_vecProbs;
- std::vector<SMobItemGroupInfo> m_vecItems;
- class CDropItemGroup
- struct SDropItemGroupInfo
- DWORD dwVnum;
- DWORD dwPct;
- int iCount;
- SDropItemGroupInfo(DWORD dwVnum, DWORD dwPct, int iCount): dwVnum(dwVnum), dwPct(dwPct), iCount(iCount)
- CDropItemGroup(DWORD dwVnum, DWORD dwMobVnum, const std::string& r_stName):m_dwVnum(dwVnum),m_dwMobVnum(dwMobVnum),m_stName(r_stName)
- const std::vector<SDropItemGroupInfo> & GetVector()
- void AddItem(DWORD dwItemVnum, DWORD dwPct, int iCount)
- DWORD m_dwVnum;
- DWORD m_dwMobVnum;
- std::string m_stName;
- std::vector<SDropItemGroupInfo> m_vec_items;
- class CLevelItemGroup
- struct SLevelItemGroupInfo
- DWORD dwVNum;
- DWORD dwPct;
- int iCount;
- SLevelItemGroupInfo(DWORD dwVnum, DWORD dwPct, int iCount): dwVNum(dwVnum), dwPct(dwPct), iCount(iCount):
- DWORD m_dwLevelLimit;
- std::string m_stName;
- std::vector<SLevelItemGroupInfo> m_vec_items;
- CLevelItemGroup(DWORD dwLevelLimit): m_dwLevelLimit(dwLevelLimit)
- DWORD GetLevelLimit() { return m_dwLevelLimit; }
- void AddItem(DWORD dwItemVnum, DWORD dwPct, int iCount)
- const std::vector<SLevelItemGroupInfo> & GetVector()
- class CBuyerThiefGlovesItemGroup
- struct SThiefGroupInfo
- DWORD dwVnum;
- DWORD dwPct;
- int iCount;
- SThiefGroupInfo(DWORD dwVnum, DWORD dwPct, int iCount): dwVnum(dwVnum), dwPct(dwPct), iCount(iCount)
- CBuyerThiefGlovesItemGroup(DWORD dwVnum, DWORD dwMobVnum, const std::string& r_stName):m_dwVnum(dwVnum),m_dwMobVnum(dwMobVnum),m_stName(r_stName)
- const std::vector<SThiefGroupInfo> & GetVector()
- void AddItem(DWORD dwItemVnum, DWORD dwPct, int iCount)
- DWORD m_dwVnum;
- DWORD m_dwMobVnum;
- std::string m_stName;
- std::vector<SThiefGroupInfo> m_vec_items;
- class ITEM;
- class ITEM_MANAGER : public singleton<ITEM_MANAGER>
- ITEM_MANAGER();
- bool Initialize(TItemTable * table, int size);
- void Destroy();
- void Update();
- void GracefulShutdown();
- DWORD GetNewID();
- bool SetMaxItemID(TItemIDRangeTable range);
- bool SetMaxSpareItemID(TItemIDRangeTable range);
- void DelayedSave(LPITEM item);
- void FlushDelayedSave(LPITEM item);
- void SaveSingleItem(LPITEM item);
- LPITEM CreateItem(DWORD vnum, DWORD count = 1, DWORD dwID = 0, bool bTryMagic = false, int iRarePct = -1, bool bSkipSave = false);
- void DestroyItem(LPITEM item);
- void RemoveItem(LPITEM item, const char * c_pszReason=NULL);
- LPITEM Find(DWORD id);
- LPITEM FindByVID(DWORD vid);
- TItemTable * GetTable(DWORD vnum);
- bool GetVnum(const char * c_pszName, DWORD & r_dwVnum);
- bool GetVnumByOriginalName(const char * c_pszName, DWORD & r_dwVnum);
- bool GetDropPct(LPCHARACTER pkChr, LPCHARACTER pkKiller, OUT int& iDeltaPercent, OUT int& iRandRange);
- bool CreateDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, std::vector<LPITEM> & vec_item);
- bool ReadCommonDropItemFile(const char * c_pszFileName);
- bool ReadEtcDropItemFile(const char * c_pszFileName);
- bool ReadDropItemGroup(const char * c_pszFileName);
- bool ReadMonsterDropItemGroup(const char * c_pszFileName);
- bool ReadSpecialDropItemFile(const char * c_pszFileName);
- bool ConvSpecialDropItemFile();
- DWORD GetRefineFromVnum(DWORD dwVnum);
- static void CopyAllAttrTo(LPITEM pkOldItem, LPITEM pkNewItem);
- const CSpecialItemGroup* GetSpecialItemGroup(DWORD dwVnum);
- const CSpecialAttrGroup* GetSpecialAttrGroup(DWORD dwVnum);
- const std::vector<TItemTable> & GetTable() { return m_vec_prototype; }
- int GetSpecialGroupFromItem(DWORD dwVnum) const { auto it = m_ItemToSpecialGroup.find(dwVnum); return (it == m_ItemToSpecialGroup.end()) ? 0 : it->second; }
- int RealNumber(DWORD vnum);
- void CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, std::vector<LPITEM> & vec_item, int iDeltaPercent, int iRandRange);
- std::map<DWORD, LPITEM> ITEM_VID_MAP;
- std::vector<TItemTable> m_vec_prototype;
- std::vector<TItemTable*> m_vec_item_vnum_range_info;
- std::map<DWORD, DWORD> m_map_ItemRefineFrom;
- int m_iTopOfTable;
- ITEM_VID_MAP m_VIDMap;
- DWORD m_dwVIDCount;
- DWORD m_dwCurrentID;
- TItemIDRangeTable m_ItemIDRange;
- TItemIDRangeTable m_ItemIDSpareRange;
- TR1_NS::unordered_set<LPITEM> m_set_pkItemForDelayedSave;
- std::map<DWORD, LPITEM> m_map_pkItemByID;
- std::map<DWORD, DWORD> m_map_dwEtcItemDropProb;
- std::map<DWORD, CDropItemGroup*> m_map_pkDropItemGroup;
- std::map<DWORD, CSpecialItemGroup*> m_map_pkSpecialItemGroup;
- std::map<DWORD, CSpecialItemGroup*> m_map_pkQuestItemGroup;
- std::map<DWORD, CSpecialAttrGroup*> m_map_pkSpecialAttrGroup;
- std::map<DWORD, CMobItemGroup*> m_map_pkMobItemGroup;
- std::map<DWORD, CLevelItemGroup*> m_map_pkLevelItemGroup;
- std::map<DWORD, CBuyerThiefGlovesItemGroup*> m_map_pkGloveItemGroup;
- std::map<DWORD, int> m_ItemToSpecialGroup;
- std::map <DWORD, DWORD> TMapDW2DW;
- TMapDW2DW m_map_new_to_ori;
- DWORD GetMaskVnum(DWORD dwVnum);
- std::map<DWORD, TItemTable> m_map_vid;
- std::map<DWORD, TItemTable>& GetVIDMap() { return m_map_vid; }
- std::vector<TItemTable>& GetVecProto() { return m_vec_prototype; }
- static int MAX_NORM_ATTR_NUM = 5;
- static int MAX_RARE_ATTR_NUM = 2;
- bool ReadItemVnumMaskTable(const char * c_pszFileName);
- item_manager_private_types.h
- class CItemDropInfo
- CItemDropInfo(int iLevelStart, int iLevelEnd, int iPercent, DWORD dwVnum) : m_iLevelStart(iLevelStart), m_iLevelEnd(iLevelEnd), m_iPercent(iPercent), m_dwVnum(dwVnum)
- int m_iLevelStart;
- int m_iLevelEnd;
- int m_iPercent;
- DWORD m_dwVnum;
- std::vector<CItemDropInfo> g_vec_pkCommonDropItem[MOB_RANK_MAX_NUM];
- struct SDropItem
- int iLvStart;
- int iLvEnd;
- float fPercent;
- char szItemName[ITEM_NAME_MAX_LEN + 1];
- int iCount;
- locale_service.h
- bool LocaleService_Init(const std::string& c_rstServiceName);
- void LocaleService_LoadLocaleStringFile();
- void LocaleService_LoadEmpireTextConvertTables();
- void LocaleService_TransferDefaultSetting();
- const std::string& LocaleService_GetBasePath();
- const std::string& LocaleService_GetMapPath();
- const std::string& LocaleService_GetQuestPath();
- enum eLocalization
- LC_NOSET = 0,
- LC_YMIR,
- LC_JAPAN,
- LC_ENGLISH,
- LC_HONGKONG,
- LC_NEWCIBN,
- LC_GERMANY,
- LC_KOREA,
- LC_FRANCE,
- LC_ITALY,
- LC_SPAIN,
- LC_UK,
- LC_TURKEY,
- LC_POLAND,
- LC_PORTUGAL,
- LC_CANADA,
- LC_GREEK,
- LC_RUSSIA,
- LC_DENMARK,
- LC_BULGARIA,
- LC_CROATIA,
- LC_MEXICO,
- LC_ARABIA,
- LC_CZECH,
- LC_ROMANIA,
- LC_HUNGARY,
- LC_NETHERLANDS,
- LC_SINGAPORE,
- LC_VIETNAM,
- LC_THAILAND,
- LC_USA,
- LC_WE_KOREA,
- LC_TAIWAN,
- LC_MAX_VALUE
- eLocalization LC_GetLocalType();
- bool LC_IsLocale( const eLocalization t );
- bool LC_IsYMIR();
- bool LC_IsJapan();
- bool LC_IsEnglish();
- bool LC_IsHongKong();
- bool LC_IsNewCIBN();
- bool LC_IsGermany();
- bool LC_IsKorea();
- bool LC_IsEurope();
- bool LC_IsCanada();
- bool LC_IsSingapore();
- bool LC_IsVietnam();
- bool LC_IsThailand();
- bool LC_IsWE_Korea();
- bool LC_IsTaiwan();
- bool LC_IsWorldEdition();
- log.h
- enum GOLDBAR_HOW
- PERSONAL_SHOP_BUY = 1 ,
- PERSONAL_SHOP_SELL = 2 ,
- SHOP_BUY = 3 ,
- SHOP_SELL = 4 ,
- EXCHANGE_TAKE = 5 ,
- EXCHANGE_GIVE = 6 ,
- QUEST = 7 ,
- class LogManager : public singleton<LogManager>
- LogManager();
- bool IsConnected();
- bool Connect(const char * host, const int port, const char * user, const char * pwd, const char * db);
- void ItemLog(DWORD dwPID, DWORD x, DWORD y, DWORD dwItemID, const char * c_pszText, const char * c_pszHint, const char * c_pszIP, DWORD dwVnum);
- void ItemLog(LPCHARACTER ch, LPITEM item, const char * c_pszText, const char * c_pszHint);
- void ItemLog(LPCHARACTER ch, int itemID, int itemVnum, const char * c_pszText, const char * c_pszHint);
- void CharLog(DWORD dwPID, DWORD x, DWORD y, DWORD dw, const char * c_pszText, const char * c_pszHint, const char * c_pszIP);
- void CharLog(LPCHARACTER ch, DWORD dw, const char * c_pszText, const char * c_pszHint);
- void LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, BYTE bLevel, BYTE bJob, DWORD dwPlayTime);
- void MoneyLog(BYTE type, DWORD vnum, int gold);
- void HackLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP);
- void HackLog(const char * c_pszHackName, LPCHARACTER ch);
- void HackCRCLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP, DWORD dwCRC);
- void GoldBarLog(DWORD dwPID, DWORD dwItemID, GOLDBAR_HOW eHow, const char * c_pszHint);
- void CubeLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, bool success);
- void GMCommandLog(DWORD dwPID, const char * szName, const char * szIP, BYTE byChannel, const char * szCommand);
- void SpeedHackLog(DWORD pid, DWORD x, DWORD y, int hack_count);
- void ChangeNameLog(DWORD pid, const char * old_name, const char * new_name, const char * ip);
- void RefineLog(DWORD pid, const char * item_name, DWORD item_id, int item_refine_level, int is_success, const char * how);
- void ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText);
- void LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour);
- void BootLog(const char * c_pszHostName, BYTE bChannel);
- void VCardLog(DWORD vcard_id, DWORD x, DWORD y, const char * hostname, const char * giver_name, const char * giver_ip, const char * taker_name, const char * taker_ip);
- void FishLog(DWORD dwPID, int prob_idx, int fish_id, int fish_level, DWORD dwMiliseconds, DWORD dwVnum = false, DWORD dwValue = 0);
- void QuestRewardLog(const char * c_pszQuestName, DWORD dwPID, DWORD dwLevel, int iValue1, int iValue2);
- void DetailLoginLog(bool isLogin, LPCHARACTER ch);
- void DragonSlayLog(DWORD dwGuildID, DWORD dwDragonVnum, DWORD dwStartTime, DWORD dwEndTime);
- void Query(const char * c_pszFormat, ...);
- CAsyncSQL m_sql;
- bool m_bIsConnect;
- login_data.h
- class CLoginData
- CLoginData();
- void SetClientKey(const DWORD * c_pdwClientKey);
- const DWORD * GetClientKey();
- void SetKey(DWORD dwKey);
- DWORD GetKey();
- void SetLogin(const char * c_pszLogin);
- const char * GetLogin();
- void SetBillType(BYTE bType);
- DWORD GetBillID();
- void SetBillID(DWORD dwID);
- BYTE GetBillType();
- void SetConnectedPeerHandle(DWORD dwHandle);
- DWORD GetConnectedPeerHandle();
- void SetLogonTime();
- DWORD GetLogonTime();
- void SetIP(const char * c_pszIP);
- const char * GetIP();
- void SetRemainSecs(long l);
- long GetRemainSecs();
- void SetBilling(bool bOn);
- bool IsBilling();
- void SetDeleted(bool bSet);
- bool IsDeleted();
- void SetPremium(int * paiPremiumTimes);
- int GetPremium(BYTE type);
- int * GetPremiumPtr();
- DWORD m_dwKey;
- DWORD m_adwClientKey[4];
- BYTE m_bBillType;
- DWORD m_dwBillID;
- DWORD m_dwConnectedPeerHandle;
- DWORD m_dwLogonTime;
- long m_lRemainSecs;
- char m_szIP[MAX_HOST_LENGTH+1];
- bool m_bBilling;
- bool m_bDeleted;
- std::string m_stLogin;
- int m_aiPremiumTimes[PREMIUM_MAX_NUM];
- login_sim.h
- class CLoginSim
- CLoginSim()
- void AddPlayer(DWORD dwID)
- bool IsCheck()
- void SendLogin()
- void SendLoad()
- void SendLogout()
- bool IsDone()
- TPacketGDAuthLogin auth;
- TPacketGDLoginByKey login;
- TPlayerLoadPacket load;
- TLogoutPacket logout;
- std::vector<DWORD> vecID;
- unsigned int vecIdx;
- bool bCheck;
- lzo_manager.h
- class LZOManager: public singleton<LZOManager>
- LZOManager();
- bool Compress(const BYTE* src, size_t srcsize, BYTE* dest, lzo_uint* puiDestSize);
- bool Decompress(const BYTE* src, size_t srcsize, BYTE* dest, lzo_uint* puiDestSize);
- size_t GetMaxCompressedSize(size_t original);
- BYTE* GetWorkMemory()
- BYTE* m_workmem;
- malloc_allocator.h
- class MallocAllocator {
- MallocAllocator() {}
- void SetUp() {}
- void TearDown() {}
- void* Alloc(size_t size)
- void Free(void* p)
- map_location.h
- class CMapLocation : public singleton<CMapLocation>
- struct SLocation
- bool Get(long x, long y, long & lMapIndex, long & lAddr, WORD & wPort);
- bool Get(int iIndex, long & lAddr, WORD & wPort);
- void Insert(long lIndex, const char * c_pszHost, WORD wPort);
- std::map<long, TLocation> m_map_address;
- MarkImage.h
- struct SGuildMark
- enum
- WIDTH = 16,
- HEIGHT = 12,
- SIZE = WIDTH * HEIGHT,
- void Clear();
- bool IsEmpty();
- struct SGuildMarkBlock
- enum
- MARK_PER_BLOCK_WIDTH = 4,
- MARK_PER_BLOCK_HEIGHT = 4,
- WIDTH = SGuildMark::WIDTH * MARK_PER_BLOCK_WIDTH,
- HEIGHT = SGuildMark::HEIGHT * MARK_PER_BLOCK_HEIGHT,
- SIZE = WIDTH * HEIGHT,
- MAX_COMP_SIZE = (SIZE * sizeof(Pixel)) + ((SIZE * sizeof(Pixel)) >> 4) + 64 + 3
- DWORD GetCRC() const;
- void CopyFrom(const BYTE * pbCompBuf, DWORD dwCompSize, DWORD crc);
- void Compress(const Pixel * pxBuf);
- class CGuildMarkImage
- enum
- WIDTH = 512,
- HEIGHT = 512,
- BLOCK_ROW_COUNT = HEIGHT / SGuildMarkBlock::HEIGHT, // 10
- BLOCK_COL_COUNT = WIDTH / SGuildMarkBlock::WIDTH, // 8
- BLOCK_TOTAL_COUNT = BLOCK_ROW_COUNT * BLOCK_COL_COUNT, // 80
- MARK_ROW_COUNT = BLOCK_ROW_COUNT * SGuildMarkBlock::MARK_PER_BLOCK_HEIGHT, // 40
- MARK_COL_COUNT = BLOCK_COL_COUNT * SGuildMarkBlock::MARK_PER_BLOCK_WIDTH, // 32
- MARK_TOTAL_COUNT = MARK_ROW_COUNT * MARK_COL_COUNT, // 1280
- INVALID_MARK_POSITION = 0xffffffff,
- CGuildMarkImage();
- void Create();
- void Destroy();
- bool Build(const char * c_szFileName);
- bool Save(const char* c_szFileName);
- bool Load(const char* c_szFileName);
- void PutData(UINT x, UINT y, UINT width, UINT height, void* data);
- void GetData(UINT x, UINT y, UINT width, UINT height, void* data);
- bool SaveMark(DWORD posMark, BYTE * pbMarkImage);
- bool DeleteMark(DWORD posMark);
- bool SaveBlockFromCompressedData(DWORD posBlock, const BYTE * pbComp, DWORD dwCompSize); /
- DWORD GetEmptyPosition();
- void GetBlockCRCList(DWORD * crcList);
- void GetDiffBlocks(const DWORD * crcList, std::map<BYTE, const SGuildMarkBlock *> & mapDiffBlocks);
- enum
- INVALID_HANDLE = 0xffffffff,
- void BuildAllBlocks();
- MarkManager.h
- class CGuildMarkManager : public singleton<CGuildMarkManager>
- enum
- MAX_IMAGE_COUNT = 5,
- INVALID_MARK_ID = 0xffffffff,
- struct TGuildSymbol
- DWORD crc;
- std::vector<BYTE> raw;
- CGuildMarkManager();
- const TGuildSymbol * GetGuildSymbol(DWORD GID);
- bool LoadSymbol(const char* filename);
- void SaveSymbol(const char* filename);
- void UploadSymbol(DWORD guildID, int iSize, const BYTE* pbyData);
- void SetMarkPathPrefix(const char * prefix);
- bool LoadMarkIndex();
- bool SaveMarkIndex();
- void LoadMarkImages();
- void SaveMarkImage(DWORD imgIdx);
- bool GetMarkImageFilename(DWORD imgIdx, std::string & path) const;
- bool AddMarkIDByGuildID(DWORD guildID, DWORD markID);
- DWORD GetMarkImageCount() const;
- DWORD GetMarkCount() const;
- DWORD GetMarkID(DWORD guildID);
- void CopyMarkIdx(char * pcBuf) const;
- DWORD SaveMark(DWORD guildID, BYTE * pbMarkImage);
- void DeleteMark(DWORD guildID);
- void GetDiffBlocks(DWORD imgIdx, const DWORD * crcList, std::map<BYTE, const SGuildMarkBlock *> & mapDiffBlocks);
- bool SaveBlockFromCompressedData(DWORD imgIdx, DWORD idBlock, const BYTE * pbBlock, DWORD dwSize);
- bool GetBlockCRCList(DWORD imgIdx, DWORD * crcList);
- marriage.h
- struct TWeddingInfo
- {
- DWORD dwMapIndex;
- };
- int MARRIAGE_POINT_PER_DAY;
- struct TMarriage
- DWORD m_pid1;
- DWORD m_pid2;
- int love_point;
- time_t marry_time;
- LPCHARACTER ch1;
- LPCHARACTER ch2;
- bool bSave;
- bool is_married;
- std::string name1;
- std::string name2;
- TWeddingInfo * pWeddingInfo;
- TMarriage(DWORD pid1, DWORD pid2, int _love_point, time_t _marry_time, const char* name1, const char* name2)
- void Login(LPCHARACTER ch);
- void Logout(DWORD pid);
- bool IsOnline()
- bool IsNear();
- DWORD GetOther(DWORD PID) const
- int GetMarriagePoint();
- int GetMarriageGrade();
- int GetBonus(DWORD dwItemVnum, bool bShare = true, LPCHARACTER me = NULL);
- void WarpToWeddingMap(DWORD dwPID);
- void Save();
- void SetMarried();
- void Update(DWORD point);
- void RequestEndWedding();
- void StartNearCheckEvent();
- void StopNearCheckEvent();
- void NearCheck();
- bool isLastNear;
- BYTE byLastLovePoint;
- LPEVENT eventNearCheck;
- class CManager : public singleton<CManager>
- CManager();
- bool Initialize();
- void Destroy();
- TMarriage* Get(DWORD dwPlayerID);
- bool IsMarriageUniqueItem(DWORD dwItemVnum);
- bool IsMarried(DWORD dwPlayerID);
- bool IsEngaged(DWORD dwPlayerID);
- bool IsEngagedOrMarried(DWORD dwPlayerID);
- void RequestAdd(DWORD dwPID1, DWORD dwPID2, const char* szName1, const char* szName2);
- void Add(DWORD dwPID1, DWORD dwPID2, time_t tMarryTime, const char* szName1, const char* szName2);
- void RequestUpdate(DWORD dwPID1, DWORD dwPID2, int iUpdatePoint, BYTE byMarried);
- void Update(DWORD dwPID1, DWORD dwPID2, long lTotalPoint, BYTE byMarried);
- void RequestRemove(DWORD dwPID1, DWORD dwPID2);
- void Remove(DWORD dwPID1, DWORD dwPID2);
- void Login(LPCHARACTER ch);
- void Logout(DWORD pid);
- void Logout(LPCHARACTER ch);
- void WeddingReady(DWORD dwPID1, DWORD dwPID2, DWORD dwMapIndex);
- void WeddingStart(DWORD dwPID1, DWORD dwPID2);
- void WeddingEnd(DWORD dwPID1, DWORD dwPID2);
- void RequestEndWedding(DWORD dwPID1, DWORD dwPID2);
- Func for_each_wedding(Func f);
- messenger_manager.h
- class MessengerManager : public singleton<MessengerManager>
- std::string keyT;
- const std::string & keyA;
- MessengerManager();
- void P2PLogin(keyA account);
- void P2PLogout(keyA account);
- void Login(keyA account);
- void Logout(keyA account);
- void RequestToAdd(LPCHARACTER ch, LPCHARACTER target);
- void AuthToAdd(keyA account, keyA companion, bool bDeny);
- void __AddToList(keyA account, keyA companion);
- void AddToList(keyA account, keyA companion);
- void __RemoveFromList(keyA account, keyA companion);
- void RemoveFromList(keyA account, keyA companion);
- void RemoveAllList(keyA account);
- void Initialize();
- void SendList(keyA account);
- void SendLogin(keyA account, keyA companion);
- void SendLogout(keyA account, keyA companion);
- void LoadList(SQLMsg * pmsg);
- void Destroy();
- mining.h
- LPEVENT CreateMiningEvent(LPCHARACTER ch, LPCHARACTER load, int count);
- DWORD GetRawOreFromLoad(DWORD dwLoadVnum);
- bool OreRefine(LPCHARACTER ch, LPCHARACTER npc, LPITEM item, int cost, int pct, LPITEM metinstone_item);
- int GetFractionCount();
- int RealRefinePick(LPCHARACTER ch, LPITEM item);
- void CHEAT_MAX_PICK(LPCHARACTER ch, LPITEM item);
- bool IsVeinOfOre (DWORD vnum);
- mob_manager.h
- struct SMobSplashAttackInfo
- DWORD dwTiming;
- DWORD dwHitDistance;
- SMobSplashAttackInfo(DWORD dwTiming, DWORD dwHitDistance)
- struct SMobSkillInfo
- DWORD dwSkillVnum;
- BYTE bSkillLevel;
- std::vector<TMobSplashAttackInfo> vecSplashAttack;
- class CMob
- CMob();
- TMobTable m_table;
- TMobSkillInfo m_mobSkillInfo[MOB_SKILL_MAX_NUM];
- void AddSkillSplash(int iIndex, DWORD dwTiming, DWORD dwHitDistance);
- class CMobInstance
- CMobInstance();
- PIXEL_POSITION m_posLastAttacked;
- DWORD m_dwLastAttackedTime;
- DWORD m_dwLastWarpTime;
- bool m_IsBerserk;
- bool m_IsGodSpeed;
- bool m_IsRevive;
- class CMobGroupGroup
- CMobGroupGroup(DWORD dwVnum)
- void AddMember(DWORD dwVnum, int prob = 1)
- DWORD GetMember()
- DWORD m_dwVnum;
- std::vector<DWORD> m_vec_dwMemberVnum;
- std::vector<int> m_vec_iProbs;
- class CMobGroup
- void Create(DWORD dwVnum, std::string & r_stName)
- const std::vector<DWORD> & GetMemberVector()
- int GetMemberCount()
- void AddMember(DWORD dwVnum)
- DWORD m_dwVnum;
- std::string m_stName;
- std::vector<DWORD> m_vec_dwMemberVnum;
- class CMobManager : public singleton<CMobManager>
- std::map<DWORD, CMob *>::iterator iterator;
- CMobManager();
- bool Initialize(TMobTable * table, int size);
- void Destroy();
- bool LoadGroup(const char * c_pszFileName);
- bool LoadGroupGroup(const char * c_pszFileName);
- CMobGroup * GetGroup(DWORD dwVnum);
- DWORD GetGroupFromGroupGroup(DWORD dwVnum);
- const CMob * Get(DWORD dwVnum);
- const CMob * Get(const char * c_pszName, bool bIsAbbrev);
- const iterator begin() { return m_map_pkMobByVnum.begin(); }
- const iterator end() { return m_map_pkMobByVnum.end(); }
- void RebindMobProto(LPCHARACTER ch);
- void IncRegenCount(BYTE bRegenType, DWORD dwVnum, int iCount, int iTime);
- void DumpRegenCount(const char* c_szFilename);
- motion.h
- enum EMotionMode
- MOTION_MODE_GENERAL,
- MOTION_MODE_ONEHAND_SWORD,
- MOTION_MODE_TWOHAND_SWORD,
- MOTION_MODE_DUALHAND_SWORD,
- MOTION_MODE_BOW,
- MOTION_MODE_BELL,
- MOTION_MODE_FAN,
- MOTION_MODE_HORSE,
- MOTION_MODE_MAX_NUM
- enum EPublicMotion
- MOTION_NONE, // 0 ¾øÀ½
- MOTION_WAIT, // 1 ´ë±â (00.msa)
- MOTION_WALK, // 2 °È±â (02.msa)
- MOTION_RUN, // 3 ¶Ù±â (03.msa)
- MOTION_CHANGE_WEAPON, // 4 ¹«±â¹Ù²Ù±â
- MOTION_DAMAGE, // 5 Á¤¸é¸Â±â (30.msa)
- MOTION_DAMAGE_FLYING, // 6 Á¤¸é³¯¾Æ°¡±â (32.msa)
- MOTION_STAND_UP, // 7 Á¤¸éÀϾ±â (33.msa)
- MOTION_DAMAGE_BACK, // 8 Èĸé¸Â±â (34.msa)
- MOTION_DAMAGE_FLYING_BACK, // 9 Èĸ鳯¾Æ°¡±â (35.msa)
- MOTION_STAND_UP_BACK, // 10 ÈĸéÀϾ±â (26.msa)
- MOTION_DEAD, // 11 Á×±â (31.msa)
- MOTION_DEAD_BACK, // 12 ÈĸéÁ×±â (37.msa)
- MOTION_NORMAL_ATTACK, // 13 ±âº» °ø°Ý
- MOTION_COMBO_ATTACK_1, // 14 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_2, // 15 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_3, // 16 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_4, // 17 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_5, // 18 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_6, // 19 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_7, // 20 ÄÞº¸ °ø°Ý
- MOTION_COMBO_ATTACK_8, // 21 ÄÞº¸ °ø°Ý
- MOTION_INTRO_WAIT, // 22 ¼±ÅÃÈ¸é ´ë±â
- MOTION_INTRO_SELECTED, // 23 ¼±ÅÃÈ¸é ¼±ÅÃ
- MOTION_INTRO_NOT_SELECTED, // 24 ¼±ÅÃÈ¸é ºñ¼±ÅÃ
- MOTION_SPAWN, // 25 ¼Òȯ
- MOTION_FISHING_THROW, // 26 ³¬½Ã ´øÁö±â
- MOTION_FISHING_WAIT, // 27 ³¬½Ã ´ë±â
- MOTION_FISHING_STOP, // 28 ³¬½Ã ±×¸¸µÎ±â
- MOTION_FISHING_REACT, // 29 ³¬½Ã ¹ÝÀÀ
- MOTION_FISHING_CATCH, // 30 ³¬½Ã Àâ±â
- MOTION_FISHING_FAIL, // 31 ³¬½Ã ½ÇÆÐ
- MOTION_STOP, // 32 ¸» ¸ØÃß±â
- MOTION_SPECIAL_1, // 33 ¸ó½ºÅÍ ½ºÅ³
- MOTION_SPECIAL_2, // 34
- MOTION_SPECIAL_3, // 35
- MOTION_SPECIAL_4, // 36
- MOTION_SPECIAL_5, // 37
- PUBLIC_MOTION_END,
- MOTION_MAX_NUM = PUBLIC_MOTION_END,
- class CMob;
- class CMotion
- CMotion();
- bool LoadFromFile(const char * c_pszFileName);
- bool LoadMobSkillFromFile(const char * c_pszFileName, CMob * pMob, int iSkillIndex);
- float GetDuration() const;
- const D3DVECTOR & GetAccumVector() const;
- bool IsEmpty();
- bool m_isEmpty;
- float m_fDuration;
- bool m_isAccumulation;
- D3DVECTOR m_vec3Accumulation;
- DWORD MOTION_KEY;
- class CMotionSet
- std::map<DWORD, CMotion *> TContainer;
- TContainer::iterator iterator;
- TContainer::const_iterator const_iterator;
- CMotionSet();
- void Insert(DWORD dwKey, CMotion * pkMotion);
- bool Load(const char * szFileName, int mode, int motion);
- const CMotion * GetMotion(DWORD dwKey) const;
- TContainer m_map_pkMotion;
- class CMotionManager : public singleton<CMotionManager>
- std::map<DWORD, CMotionSet *> TContainer;
- TContainer::iterator iterator;
- CMotionManager();
- bool Build();
- const CMotionSet * GetMotionSet(DWORD dwVnum);
- const CMotion * GetMotion(DWORD dwVnum, DWORD dwKey);
- float GetMotionDuration(DWORD dwVnum, DWORD dwKey);
- float GetNormalAttackDuration(DWORD dwVnum);
- TContainer m_map_pkMotionSet;
- std::map<DWORD, float> m_map_normalAttackDuration;
- object_allocator.h
- enum
- DEFAULT_FREE_TRIGGER_COUNT = 32
- std::deque<void*> FreeList;
- class LateAllocator
- LateAllocator() {}
- static void* Alloc(size_t size)
- static void Free(void* p)
- static size_t GetFreeBlockCount()
- static size_t m_freeBlockCount;
- static FreeList m_freeBlocks;
- size_t LateAllocator<OBJ, FREE_TRIGGER>::m_freeBlockCount = 0;
- FreeList LateAllocator<OBJ, FREE_TRIGGER>::m_freeBlocks;
- class ObjectAllocator
- ObjectAllocator() {}
- static void* operator new( size_t size )
- static void operator delete( void* p, size_t size )
- static void* operator new( size_t size, const char* f, size_t l )
- static size_t GetFreeBlockCount()
- static LateAllocator<OBJ, FREE_TRIGGER> m_allocator;
- over9refine.h
- class COver9RefineManager : public singleton<COver9RefineManager>
- OVER9ITEM_MAP m_mapItem;
- void enableOver9Refine(DWORD dwVnumFrom, DWORD dwVnumTo);
- int canOver9Refine(DWORD dwVnum);
- bool Change9ToOver9(LPCHARACTER pChar, LPITEM item);
- bool Over9Refine(LPCHARACTER pChat, LPITEM item);
- DWORD GetMaterialVnum(DWORD baseVnum);
- OXEvent.h
- struct tag_Quiz
- char level;
- char Quiz[256];
- bool answer;
- enum OXEventStatus
- OXEVENT_FINISH = 0,
- OXEVENT_OPEN = 1,
- OXEVENT_CLOSE = 2,
- OXEVENT_QUIZ = 3,
- OXEVENT_ERR = 0xff
- class COXEventManager : public singleton<COXEventManager>
- std::map<DWORD, DWORD> m_map_char;
- std::map<DWORD, DWORD> m_map_attender;
- std::map<DWORD, DWORD> m_map_miss;
- std::vector<std::vector<tag_Quiz> > m_vec_quiz;
- LPEVENT m_timedEvent;
- bool CheckAnswer();
- bool EnterAudience(LPCHARACTER pChar);
- bool EnterAttender(LPCHARACTER pChar);
- bool Initialize();
- void Destroy();
- OXEventStatus GetStatus();
- void SetStatus(OXEventStatus status);
- bool LoadQuizScript(const char* szFileName);
- bool Enter(LPCHARACTER pChar);
- bool CloseEvent();
- void ClearQuiz();
- bool AddQuiz(unsigned char level, const char* pszQuestion, bool answer);
- bool ShowQuizList(LPCHARACTER pChar);
- bool Quiz(unsigned char level, int timelimit);
- bool GiveItemToAttender(DWORD dwItemVnum, BYTE count);
- bool CheckAnswer(bool answer);
- void WarpToAudience();
- bool LogWinner();
- DWORD GetAttenderCount() { return m_map_attender.size(); }
- p2p.h
- struct _CCI
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- DWORD dwPID;
- BYTE bEmpire;
- long lMapIndex;
- BYTE bChannel;
- LPDESC pkDesc;
- class P2P_MANAGER : public singleton<P2P_MANAGER>
- P2P_MANAGER();
- void RegisterAcceptor(LPDESC d);
- void UnregisterAcceptor(LPDESC d);
- void RegisterConnector(LPDESC d);
- void UnregisterConnector(LPDESC d);
- void EraseUserByDesc(LPDESC d);
- void FlushOutput();
- void Boot(LPDESC d);
- void Send(const void * c_pvData, int iSize, LPDESC except = NULL);
- void Login(LPDESC d, const TPacketGGLogin * p);
- void Logout(const char * c_pszName);
- CCI * Find(const char * c_pszName);
- CCI * FindByPID(DWORD pid);
- int GetCount();
- int GetEmpireUserCount(int idx);
- int GetDescCount();
- void GetP2PHostNames(std::string& hostNames);
- void Logout(CCI * pkCCI);
- CInputProcessor * m_pkInputProcessor;
- int m_iHandleCount;
- boost::unordered_map<std::string, CCI *, stringhash> TCCIMap;
- boost::unordered_map<DWORD, CCI*> TPIDCCIMap;
- TR1_NS::unordered_set<LPDESC> m_set_pkPeers;
- TCCIMap m_map_pkCCI;
- TPIDCCIMap m_map_dwPID_pkCCI;
- int m_aiEmpireUserCount[EMPIRE_MAX_NUM];
- service.h
- enum
- HEADER_CG_HANDSHAKE = 0xff,
- HEADER_CG_PONG = 0xfe,
- HEADER_CG_TIME_SYNC = 0xfc,
- HEADER_CG_LOGIN = 1,
- HEADER_CG_ATTACK = 2,
- HEADER_CG_CHAT = 3,
- HEADER_CG_CHARACTER_CREATE = 4,
- HEADER_CG_CHARACTER_DELETE = 5,
- HEADER_CG_CHARACTER_SELECT = 6,
- HEADER_CG_MOVE = 7,
- HEADER_CG_SYNC_POSITION = 8,
- HEADER_CG_ENTERGAME = 10,
- HEADER_CG_ITEM_USE = 11,
- HEADER_CG_ITEM_DROP = 12,
- HEADER_CG_ITEM_MOVE = 13,
- HEADER_CG_ITEM_PICKUP = 15,
- HEADER_CG_QUICKSLOT_ADD = 16,
- HEADER_CG_QUICKSLOT_DEL = 17,
- HEADER_CG_QUICKSLOT_SWAP = 18,
- HEADER_CG_WHISPER = 19,
- HEADER_CG_ITEM_DROP2 = 20,
- HEADER_CG_ITEM_DESTROY = 21,
- HEADER_CG_ON_CLICK = 26,
- HEADER_CG_EXCHANGE = 27,
- HEADER_CG_CHARACTER_POSITION = 28,
- HEADER_CG_SCRIPT_ANSWER = 29,
- HEADER_CG_QUEST_INPUT_STRING = 30,
- HEADER_CG_QUEST_CONFIRM = 31,
- HEADER_CG_SHOP = 50,
- HEADER_CG_FLY_TARGETING = 51,
- HEADER_CG_USE_SKILL = 52,
- HEADER_CG_ADD_FLY_TARGETING = 53,
- HEADER_CG_SHOOT = 54,
- HEADER_CG_MYSHOP = 55,
- HEADER_CG_ITEM_USE_TO_ITEM = 60,
- HEADER_CG_TARGET = 61,
- HEADER_CG_TEXT = 64,
- HEADER_CG_WARP = 65,
- HEADER_CG_SCRIPT_BUTTON = 66,
- HEADER_CG_MESSENGER = 67,
- HEADER_CG_MALL_CHECKOUT = 69,
- HEADER_CG_SAFEBOX_CHECKIN = 70,
- HEADER_CG_SAFEBOX_CHECKOUT = 71,
- HEADER_CG_PARTY_INVITE = 72,
- HEADER_CG_PARTY_INVITE_ANSWER = 73,
- HEADER_CG_PARTY_REMOVE = 74,
- HEADER_CG_PARTY_SET_STATE = 75,
- HEADER_CG_PARTY_USE_SKILL = 76,
- HEADER_CG_SAFEBOX_ITEM_MOVE = 77,
- HEADER_CG_PARTY_PARAMETER = 78,
- HEADER_CG_GUILD = 80,
- HEADER_CG_ANSWER_MAKE_GUILD = 81,
- HEADER_CG_FISHING = 82,
- HEADER_CG_ITEM_GIVE = 83,
- HEADER_CG_EMPIRE = 90,
- HEADER_CG_REFINE = 96,
- HEADER_CG_MARK_LOGIN = 100,
- HEADER_CG_MARK_CRCLIST = 101,
- HEADER_CG_MARK_UPLOAD = 102,
- HEADER_CG_MARK_IDXLIST = 104,
- HEADER_CG_HACK = 105,
- HEADER_CG_CHANGE_NAME = 106,
- HEADER_CG_LOGIN2 = 109,
- HEADER_CG_DUNGEON = 110,
- HEADER_CG_LOGIN3 = 111,
- HEADER_CG_GUILD_SYMBOL_UPLOAD = 112,
- HEADER_CG_SYMBOL_CRC = 113,
- HEADER_CG_SCRIPT_SELECT_ITEM = 114,
- HEADER_CG_LOGIN5_OPENID = 116,
- HEADER_CG_DRAGON_SOUL_REFINE = 205,
- HEADER_CG_STATE_CHECKER = 206,
- HEADER_CG_CLIENT_VERSION = 0xfd,
- HEADER_CG_CLIENT_VERSION2 = 0xf1,
- HEADER_GC_TIME_SYNC = 0xfc,
- HEADER_GC_PHASE = 0xfd,
- HEADER_GC_BINDUDP = 0xfe,
- HEADER_GC_HANDSHAKE = 0xff,
- HEADER_GC_CHARACTER_ADD = 1,
- HEADER_GC_CHARACTER_DEL = 2,
- HEADER_GC_MOVE = 3,
- HEADER_GC_CHAT = 4,
- HEADER_GC_SYNC_POSITION = 5,
- HEADER_GC_LOGIN_SUCCESS = 6,
- HEADER_GC_LOGIN_SUCCESS_NEWSLOT = 32,
- HEADER_GC_LOGIN_FAILURE = 7,
- HEADER_GC_CHARACTER_CREATE_SUCCESS = 8,
- HEADER_GC_CHARACTER_CREATE_FAILURE = 9,
- HEADER_GC_CHARACTER_DELETE_SUCCESS = 10,
- HEADER_GC_CHARACTER_DELETE_WRONG_SOCIAL_ID = 11,
- HEADER_GC_ATTACK = 12,
- HEADER_GC_STUN = 13,
- HEADER_GC_DEAD = 14,
- HEADER_GC_MAIN_CHARACTER_OLD = 15,
- HEADER_GC_CHARACTER_POINTS = 16,
- HEADER_GC_CHARACTER_POINT_CHANGE = 17,
- HEADER_GC_CHANGE_SPEED = 18,
- HEADER_GC_CHARACTER_UPDATE = 19,
- HEADER_GC_CHARACTER_UPDATE_NEW = 24,
- HEADER_GC_ITEM_DEL = 20,
- HEADER_GC_ITEM_SET = 21,
- HEADER_GC_ITEM_USE = 22,
- HEADER_GC_ITEM_DROP = 23,
- HEADER_GC_ITEM_UPDATE = 25,
- HEADER_GC_ITEM_GROUND_ADD = 26,
- HEADER_GC_ITEM_GROUND_DEL = 27,
- HEADER_GC_QUICKSLOT_ADD = 28,
- HEADER_GC_QUICKSLOT_DEL = 29,
- HEADER_GC_QUICKSLOT_SWAP = 30,
- HEADER_GC_ITEM_OWNERSHIP = 31,
- HEADER_GC_WHISPER = 34,
- HEADER_GC_MOTION = 36,
- HEADER_GC_PARTS = 37,
- HEADER_GC_SHOP = 38,
- HEADER_GC_SHOP_SIGN = 39,
- HEADER_GC_DUEL_START = 40,
- HEADER_GC_PVP = 41,
- HEADER_GC_EXCHANGE = 42,
- HEADER_GC_CHARACTER_POSITION = 43,
- HEADER_GC_PING = 44,
- HEADER_GC_SCRIPT = 45,
- HEADER_GC_QUEST_CONFIRM = 46,
- HEADER_GC_MOUNT = 61,
- HEADER_GC_OWNERSHIP = 62,
- HEADER_GC_TARGET = 63,
- HEADER_GC_WARP = 65,
- HEADER_GC_ADD_FLY_TARGETING = 69,
- HEADER_GC_CREATE_FLY = 70,
- HEADER_GC_FLY_TARGETING = 71,
- HEADER_GC_SKILL_LEVEL_OLD = 72,
- HEADER_GC_SKILL_LEVEL = 76,
- HEADER_GC_MESSENGER = 74,
- HEADER_GC_GUILD = 75,
- HEADER_GC_PARTY_INVITE = 77,
- HEADER_GC_PARTY_ADD = 78,
- HEADER_GC_PARTY_UPDATE = 79,
- HEADER_GC_PARTY_REMOVE = 80,
- HEADER_GC_QUEST_INFO = 81,
- HEADER_GC_REQUEST_MAKE_GUILD = 82,
- HEADER_GC_PARTY_PARAMETER = 83,
- HEADER_GC_SAFEBOX_SET = 85,
- HEADER_GC_SAFEBOX_DEL = 86,
- HEADER_GC_SAFEBOX_WRONG_PASSWORD = 87,
- HEADER_GC_SAFEBOX_SIZE = 88,
- HEADER_GC_FISHING = 89,
- HEADER_GC_EMPIRE = 90,
- HEADER_GC_PARTY_LINK = 91,
- HEADER_GC_PARTY_UNLINK = 92,
- HEADER_GC_REFINE_INFORMATION_OLD = 95,
- HEADER_GC_VIEW_EQUIP = 99,
- HEADER_GC_MARK_BLOCK = 100,
- HEADER_GC_MARK_IDXLIST = 102,
- HEADER_GC_TIME = 106,
- HEADER_GC_CHANGE_NAME = 107,
- HEADER_GC_DUNGEON = 110,
- HEADER_GC_WALK_MODE = 111,
- HEADER_GC_SKILL_GROUP = 112,
- HEADER_GC_MAIN_CHARACTER = 113,
- HEADER_GC_SEPCIAL_EFFECT = 114,
- HEADER_GC_NPC_POSITION = 115,
- HEADER_GC_LOGIN_KEY = 118,
- HEADER_GC_REFINE_INFORMATION = 119,
- HEADER_GC_CHANNEL = 121,
- HEADER_GC_TARGET_UPDATE = 123,
- HEADER_GC_TARGET_DELETE = 124,
- HEADER_GC_TARGET_CREATE = 125,
- HEADER_GC_AFFECT_ADD = 126,
- HEADER_GC_AFFECT_REMOVE = 127,
- HEADER_GC_MALL_OPEN = 122,
- HEADER_GC_MALL_SET = 128,
- HEADER_GC_MALL_DEL = 129,
- HEADER_GC_LAND_LIST = 130,
- HEADER_GC_LOVER_INFO = 131,
- HEADER_GC_LOVE_POINT_UPDATE = 132,
- HEADER_GC_SYMBOL_DATA = 133,
- HEADER_GC_DIG_MOTION = 134,
- HEADER_GC_DAMAGE_INFO = 135,
- HEADER_GC_CHAR_ADDITIONAL_INFO = 136,
- HEADER_GC_MAIN_CHARACTER3_BGM = 137,
- HEADER_GC_MAIN_CHARACTER4_BGM_VOL = 138,
- HEADER_GC_AUTH_SUCCESS = 150,
- HEADER_GC_AUTH_SUCCESS_OPENID = 154,
- HEADER_GC_ROULETTE = 200,
- HEADER_GC_HS_REQUEST = 204,
- HEADER_GC_XTRAP_CS1_REQUEST = 205,
- HEADER_GC_SPECIFIC_EFFECT = 208,
- HEADER_GC_DRAGON_SOUL_REFINE = 209,
- HEADER_GC_RESPOND_CHANNELSTATUS = 210,
- HEADER_GG_LOGIN = 1,
- HEADER_GG_LOGOUT = 2,
- HEADER_GG_RELAY = 3,
- HEADER_GG_NOTICE = 4,
- HEADER_GG_SHUTDOWN = 5,
- HEADER_GG_GUILD = 6,
- HEADER_GG_DISCONNECT = 7,
- HEADER_GG_SHOUT = 8,
- HEADER_GG_SETUP = 9,
- HEADER_GG_MESSENGER_ADD = 10,
- HEADER_GG_MESSENGER_REMOVE = 11,
- HEADER_GG_FIND_POSITION = 12,
- HEADER_GG_WARP_CHARACTER = 13,
- HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15,
- HEADER_GG_TRANSFER = 16,
- HEADER_GG_XMAS_WARP_SANTA = 17,
- HEADER_GG_XMAS_WARP_SANTA_REPLY = 18,
- HEADER_GG_RELOAD_CRC_LIST = 19,
- HEADER_GG_LOGIN_PING = 20,
- HEADER_GG_CHECK_CLIENT_VERSION = 21,
- HEADER_GG_BLOCK_CHAT = 22,
- HEADER_GG_SIEGE = 25,
- HEADER_GG_CHECK_AWAKENESS = 29,
- struct SPacketGGSetup
- BYTE bHeader;
- WORD wPort;
- BYTE bChannel;
- struct SPacketGGLogin
- BYTE bHeader;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- DWORD dwPID;
- BYTE bEmpire;
- long lMapIndex;
- BYTE bChannel;
- struct SPacketGGLogout
- BYTE bHeader;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- struct SPacketGGRelay
- BYTE bHeader;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- long lSize;
- struct SPacketGGNotice
- BYTE bHeader;
- long lSize;
- struct SPacketGGForkedMapInfo
- BYTE bHeader;
- BYTE bPass;
- BYTE bSungzi;
- struct SPacketGGShutdown
- BYTE bHeader;
- struct SPacketGGGuild
- BYTE bHeader;
- BYTE bSubHeader;
- DWORD dwGuild;
- enum
- GUILD_SUBHEADER_GG_CHAT,
- GUILD_SUBHEADER_GG_SET_MEMBER_COUNT_BONUS,
- struct SPacketGGGuildChat
- BYTE bHeader;
- BYTE bSubHeader;
- DWORD dwGuild;
- char szText[CHAT_MAX_LEN + 1];
- struct SPacketGGParty
- BYTE header;
- BYTE subheader;
- DWORD pid;
- DWORD leaderpid;
- enum
- PARTY_SUBHEADER_GG_CREATE,
- PARTY_SUBHEADER_GG_DESTROY,
- PARTY_SUBHEADER_GG_JOIN,
- PARTY_SUBHEADER_GG_QUIT,
- struct SPacketGGDisconnect
- BYTE bHeader;
- char szLogin[LOGIN_MAX_LEN + 1];
- struct SPacketGGShout
- BYTE bHeader;
- BYTE bEmpire;
- char szText[CHAT_MAX_LEN + 1];
- struct SPacketGGXmasWarpSanta
- BYTE bHeader;
- BYTE bChannel;
- long lMapIndex;
- struct SPacketGGXmasWarpSantaReply
- BYTE bHeader;
- BYTE bChannel;
- struct SPacketGGMessenger
- BYTE bHeader;
- char szAccount[CHARACTER_NAME_MAX_LEN + 1];
- char szCompanion[CHARACTER_NAME_MAX_LEN + 1];
- struct SPacketGGFindPosition
- BYTE header;
- DWORD dwFromPID;
- DWORD dwTargetPID;
- struct SPacketGGWarpCharacter
- BYTE header;
- DWORD pid;
- long x;
- long y;
- struct SPacketGGGuildWarMapIndex
- BYTE bHeader;
- DWORD dwGuildID1;
- DWORD dwGuildID2;
- long lMapIndex;
- struct SPacketGGTransfer
- BYTE bHeader;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- long lX, lY;
- struct SPacketGGLoginPing
- BYTE bHeader;
- char szLogin[LOGIN_MAX_LEN + 1];
- struct SPacketGGBlockChat
- BYTE bHeader;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- long lBlockDuration;
- struct command_text
- BYTE bHeader;
- struct command_handshake
- BYTE bHeader;
- DWORD dwHandshake;
- DWORD dwTime;
- long lDelta;
- struct command_login
- BYTE header;
- char login[LOGIN_MAX_LEN + 1];
- char passwd[PASSWD_MAX_LEN + 1];
- struct command_login2
- BYTE header;
- char login[LOGIN_MAX_LEN + 1];
- DWORD dwLoginKey;
- DWORD adwClientKey[4];
- struct command_login3
- BYTE header;
- char login[LOGIN_MAX_LEN + 1];
- char passwd[PASSWD_MAX_LEN + 1];
- DWORD adwClientKey[4];
- struct command_login5
- BYTE header;
- char authKey[OPENID_AUTHKEY_LEN + 1];
- DWORD adwClientKey[4];
- struct packet_login_key
- BYTE bHeader;
- DWORD dwLoginKey;
- struct command_player_select
- BYTE header;
- BYTE index;
- struct command_player_delete
- BYTE header;
- BYTE index;
- char private_code[8];
- struct command_player_create
- BYTE header;
- BYTE index;
- char name[CHARACTER_NAME_MAX_LEN + 1];
- WORD job;
- BYTE shape;
- BYTE Con;
- BYTE Int;
- BYTE Str;
- BYTE Dex;
- struct command_player_create_success
- BYTE header;
- BYTE bAccountCharacterIndex;
- TSimplePlayer player;
- struct command_attack
- BYTE bHeader;
- BYTE bType;
- DWORD dwVID;
- BYTE bCRCMagicCubeProcPiece;
- BYTE bCRCMagicCubeFilePiece;
- enum EMoveFuncType
- FUNC_WAIT,
- FUNC_MOVE,
- FUNC_ATTACK,
- FUNC_COMBO,
- FUNC_MOB_SKILL,
- _FUNC_SKILL,
- FUNC_MAX_NUM,
- FUNC_SKILL = 0x80,
- struct command_move
- BYTE bHeader;
- BYTE bFunc;
- BYTE bArg;
- BYTE bRot;
- long lX;
- long lY;
- DWORD dwTime;
- struct command_sync_position_element
- DWORD dwVID;
- long lX;
- long lY;
- struct command_sync_position
- BYTE bHeader;
- WORD wSize;
- struct command_chat
- BYTE header;
- WORD size;
- BYTE type;
- struct command_whisper
- BYTE bHeader;
- WORD wSize;
- char szNameTo[CHARACTER_NAME_MAX_LEN + 1];
- struct command_entergame
- BYTE header;
- struct command_item_use
- BYTE header;
- TItemPos Cell;
- struct command_item_use_to_item
- BYTE header;
- TItemPos Cell;
- TItemPos TargetCell;
- struct command_item_drop
- BYTE header;
- TItemPos Cell;
- DWORD gold;
- struct command_item_drop2
- BYTE header;
- TItemPos Cell;
- DWORD gold;
- BYTE count;
- struct command_item_destroy
- BYTE header;
- TItemPos Cell;
- struct command_item_move
- BYTE header;
- TItemPos Cell;
- TItemPos CellTo;
- BYTE count;
- struct command_item_pickup
- BYTE header;
- DWORD vid;
- struct command_quickslot_add
- BYTE header;
- BYTE pos;
- TQuickslot slot;
- struct command_quickslot_del
- BYTE header;
- BYTE pos;
- struct command_quickslot_swap
- BYTE header;
- BYTE pos;
- BYTE change_pos;
- enum
- SHOP_SUBHEADER_CG_END,
- SHOP_SUBHEADER_CG_BUY,
- SHOP_SUBHEADER_CG_SELL,
- SHOP_SUBHEADER_CG_SELL2
- struct command_shop_buy
- BYTE count;
- struct command_shop_sell
- BYTE pos;
- BYTE count;
- struct command_shop
- BYTE header;
- BYTE subheader;
- struct command_on_click
- BYTE header;
- DWORD vid;
- enum
- EXCHANGE_SUBHEADER_CG_START, /* arg1 == vid of target character */
- EXCHANGE_SUBHEADER_CG_ITEM_ADD, /* arg1 == position of item */
- EXCHANGE_SUBHEADER_CG_ITEM_DEL, /* arg1 == position of item */
- EXCHANGE_SUBHEADER_CG_ELK_ADD, /* arg1 == amount of gold */
- EXCHANGE_SUBHEADER_CG_ACCEPT, /* arg1 == not used */
- EXCHANGE_SUBHEADER_CG_CANCEL, /* arg1 == not used */
- struct command_exchange
- BYTE header;
- BYTE sub_header;
- DWORD arg1;
- BYTE arg2;
- TItemPos Pos;
- struct command_position
- BYTE header;
- BYTE position;
- struct command_script_answer
- BYTE header;
- BYTE answer;
- struct command_script_button
- BYTE header;
- unsigned int idx;
- struct command_quest_input_string
- BYTE header;
- char msg[64+1];
- struct command_quest_confirm
- BYTE header;
- BYTE answer;
- DWORD requestPID;
- struct packet_quest_confirm
- BYTE header;
- char msg[64+1];
- long timeout;
- DWORD requestPID;
- struct packet_handshake
- BYTE bHeader;
- DWORD dwHandshake;
- DWORD dwTime;
- long lDelta;
- enum EPhase
- PHASE_CLOSE,
- PHASE_HANDSHAKE,
- PHASE_LOGIN,
- PHASE_SELECT,
- PHASE_LOADING,
- PHASE_GAME,
- PHASE_DEAD,
- PHASE_CLIENT_CONNECTING,
- PHASE_DBCLIENT,
- PHASE_P2P,
- PHASE_AUTH,
- struct packet_phase
- BYTE header;
- BYTE phase;
- struct packet_bindudp
- BYTE header;
- DWORD addr;
- WORD port;
- enum
- LOGIN_FAILURE_ALREADY = 1,
- LOGIN_FAILURE_ID_NOT_EXIST = 2,
- LOGIN_FAILURE_WRONG_PASS = 3,
- LOGIN_FAILURE_FALSE = 4,
- LOGIN_FAILURE_NOT_TESTOR = 5,
- LOGIN_FAILURE_NOT_TEST_TIME = 6,
- LOGIN_FAILURE_FULL = 7
- struct packet_login_success
- BYTE bHeader;
- TSimplePlayer players[PLAYER_PER_ACCOUNT];
- DWORD guild_id[PLAYER_PER_ACCOUNT];
- char guild_name[PLAYER_PER_ACCOUNT][GUILD_NAME_MAX_LEN+1];
- DWORD handle;
- DWORD random_key;
- struct packet_auth_success
- BYTE bHeader;
- DWORD dwLoginKey;
- BYTE bResult;
- struct packet_auth_success_openid
- BYTE bHeader;
- DWORD dwLoginKey;
- BYTE bResult;
- char login[LOGIN_MAX_LEN + 1];
- struct packet_login_failure
- BYTE header;
- char szStatus[ACCOUNT_STATUS_MAX_LEN + 1];
- struct packet_create_failure
- BYTE header;
- BYTE bType;
- enum
- ADD_CHARACTER_STATE_DEAD = (1 << 0),
- ADD_CHARACTER_STATE_SPAWN = (1 << 1),
- ADD_CHARACTER_STATE_GUNGON = (1 << 2),
- ADD_CHARACTER_STATE_KILLER = (1 << 3),
- ADD_CHARACTER_STATE_PARTY = (1 << 4),
- enum ECharacterEquipmentPart
- CHR_EQUIPPART_ARMOR,
- CHR_EQUIPPART_WEAPON,
- CHR_EQUIPPART_HEAD,
- CHR_EQUIPPART_HAIR,
- CHR_EQUIPPART_NUM,
- struct packet_add_char
- BYTE header;
- DWORD dwVID;
- float angle;
- long x;
- long y;
- long z;
- BYTE bType;
- WORD wRaceNum;
- BYTE bMovingSpeed;
- BYTE bAttackSpeed;
- BYTE bStateFlag;
- DWORD dwAffectFlag[2];
- struct packet_char_additional_info
- BYTE header;
- DWORD dwVID;
- char name[CHARACTER_NAME_MAX_LEN + 1];
- WORD awPart[CHR_EQUIPPART_NUM];
- BYTE bEmpire;
- DWORD dwGuildID;
- DWORD dwLevel;
- short sAlignment;
- BYTE bPKMode;
- DWORD dwMountVnum;
- struct packet_update_char
- BYTE header;
- DWORD dwVID;
- WORD awPart[CHR_EQUIPPART_NUM];
- BYTE bMovingSpeed;
- BYTE bAttackSpeed;
- BYTE bStateFlag;
- DWORD dwAffectFlag[2];
- DWORD dwGuildID;
- short sAlignment;
- BYTE bPKMode;
- DWORD dwMountVnum;
- struct packet_del_char
- BYTE header;
- DWORD id;
- struct packet_chat
- BYTE header;
- WORD size;
- BYTE type;
- DWORD id;
- BYTE bEmpire;
- struct packet_whisper
- BYTE bHeader;
- WORD wSize;
- BYTE bType;
- char szNameFrom[CHARACTER_NAME_MAX_LEN + 1];
- struct packet_main_character
- BYTE header;
- DWORD dwVID;
- WORD wRaceNum;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- long lx, ly, lz;
- BYTE empire;
- BYTE skill_group;
- struct packet_main_character3_bgm
- enum
- MUSIC_NAME_LEN = 24,
- BYTE header;
- DWORD dwVID;
- WORD wRaceNum;
- char szChrName[CHARACTER_NAME_MAX_LEN + 1];
- char szBGMName[MUSIC_NAME_LEN + 1];
- long lx, ly, lz;
- BYTE empire;
- BYTE skill_group;
- struct packet_main_character4_bgm_vol
- enum
- MUSIC_NAME_LEN = 24,
- BYTE header;
- DWORD dwVID;
- WORD wRaceNum;
- char szChrName[CHARACTER_NAME_MAX_LEN + 1];
- char szBGMName[MUSIC_NAME_LEN + 1];
- float fBGMVol;
- long lx, ly, lz;
- BYTE empire;
- BYTE skill_group;
- struct packet_points
- BYTE header;
- INT points[POINT_MAX_NUM];
- struct packet_skill_level
- BYTE bHeader;
- TPlayerSkill skills[SKILL_MAX_NUM];
- struct packet_point_change
- int header;
- DWORD dwVID;
- BYTE type;
- long amount;
- long value;
- struct packet_stun
- BYTE header;
- DWORD vid;
- struct packet_dead
- BYTE header;
- DWORD vid;
- struct TPacketGCItemDelDeprecated
- BYTE header;
- TItemPos Cell;
- DWORD vnum;
- BYTE count;
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- struct packet_item_set
- BYTE header;
- TItemPos Cell;
- DWORD vnum;
- BYTE count;
- DWORD flags;
- DWORD anti_flags;
- bool highlight;
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- struct packet_item_del
- BYTE header;
- BYTE pos;
- struct packet_item_use
- BYTE header;
- TItemPos Cell;
- DWORD ch_vid;
- DWORD victim_vid;
- DWORD vnum;
- struct packet_item_move
- BYTE header;
- TItemPos Cell;
- TItemPos CellTo;
- struct packet_item_update
- BYTE header;
- TItemPos Cell;
- BYTE count;
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- struct packet_item_ground_add
- BYTE bHeader;
- long x, y, z;
- DWORD dwVID;
- DWORD dwVnum;
- struct packet_item_ownership
- BYTE bHeader;
- DWORD dwVID;
- char szName[CHARACTER_NAME_MAX_LEN + 1];
- struct packet_item_ground_del
- BYTE bHeader;
- DWORD dwVID;
- struct packet_quickslot_add
- BYTE header;
- BYTE pos;
- TQuickslot slot;
- struct packet_quickslot_del
- BYTE header;
- BYTE pos;
- struct packet_quickslot_swap
- BYTE header;
- BYTE pos;
- BYTE pos_to;
- struct packet_motion
- BYTE header;
- DWORD vid;
- DWORD victim_vid;
- WORD motion;
- enum EPacketShopSubHeaders
- SHOP_SUBHEADER_GC_START,
- SHOP_SUBHEADER_GC_END,
- SHOP_SUBHEADER_GC_UPDATE_ITEM,
- SHOP_SUBHEADER_GC_UPDATE_PRICE,
- SHOP_SUBHEADER_GC_OK,
- SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY,
- SHOP_SUBHEADER_GC_SOLDOUT,
- SHOP_SUBHEADER_GC_INVENTORY_FULL,
- SHOP_SUBHEADER_GC_INVALID_POS,
- SHOP_SUBHEADER_GC_SOLD_OUT,
- SHOP_SUBHEADER_GC_START_EX,
- SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY_EX,
- struct packet_shop_item
- DWORD vnum;
- DWORD price;
- BYTE count;
- BYTE display_pos;
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- struct packet_shop_start
- DWORD owner_vid;
- struct packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
- struct packet_shop_start_ex
- struct sub_packet_shop_tab
- char name[SHOP_TAB_NAME_MAX];
- BYTE coin_type;
- packet_shop_item items[SHOP_HOST_ITEM_MAX_NUM];
- DWORD owner_vid;
- BYTE shop_tab_count;
- struct packet_shop_update_item
- BYTE pos;
- struct packet_shop_item item;
- struct packet_shop_update_price
- int iPrice;
- struct packet_shop
- BYTE header;
- WORD size;
- BYTE subheader;
- struct packet_exchange
- BYTE header;
- BYTE sub_header;
- BYTE is_me;
- DWORD arg1; // vnum
- TItemPos arg2; // cell
- DWORD arg3; // count
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- enum EPacketTradeSubHeaders
- EXCHANGE_SUBHEADER_GC_START, /* arg1 == vid */
- EXCHANGE_SUBHEADER_GC_ITEM_ADD, /* arg1 == vnum arg2 == pos arg3 == count */
- EXCHANGE_SUBHEADER_GC_ITEM_DEL,
- EXCHANGE_SUBHEADER_GC_GOLD_ADD, /* arg1 == gold */
- EXCHANGE_SUBHEADER_GC_ACCEPT, /* arg1 == accept */
- EXCHANGE_SUBHEADER_GC_END, /* arg1 == not used */
- EXCHANGE_SUBHEADER_GC_ALREADY, /* arg1 == not used */
- EXCHANGE_SUBHEADER_GC_LESS_GOLD, /* arg1 == not used */
- struct packet_position
- BYTE header;
- DWORD vid;
- BYTE position;
- struct packet_ping
- BYTE header;
- struct packet_script
- BYTE header;
- WORD size;
- BYTE skin;
- WORD src_size;
- struct packet_change_speed
- BYTE header;
- DWORD vid;
- WORD moving_speed;
- struct packet_mount
- BYTE header;
- DWORD vid;
- DWORD mount_vid;
- BYTE pos;
- DWORD x, y;
- struct packet_move
- BYTE bHeader;
- BYTE bFunc;
- BYTE bArg;
- BYTE bRot;
- DWORD dwVID;
- long lX;
- long lY;
- DWORD dwTime;
- DWORD dwDuration;
- struct packet_ownership
- BYTE bHeader;
- DWORD dwOwnerVID;
- DWORD dwVictimVID;
- struct packet_sync_position_element
- DWORD dwVID;
- long lX;
- long lY;
- struct packet_sync_position
- BYTE bHeader;
- WORD wSize;
- struct packet_fly
- BYTE bHeader;
- BYTE bType;
- DWORD dwStartVID;
- DWORD dwEndVID;
- struct command_fly_targeting
- BYTE bHeader;
- DWORD dwTargetVID;
- long x, y;
- struct packet_fly_targeting
- BYTE bHeader;
- DWORD dwShooterVID;
- DWORD dwTargetVID;
- long x, y;
- struct packet_shoot
- BYTE bHeader;
- BYTE bType;
- struct packet_duel_start
- BYTE header;
- WORD wSize;
- enum EPVPModes
- PVP_MODE_NONE,
- PVP_MODE_AGREE,
- PVP_MODE_FIGHT,
- PVP_MODE_REVENGE
- struct packet_pvp
- BYTE bHeader;
- DWORD dwVIDSrc;
- DWORD dwVIDDst;
- BYTE bMode;
- struct command_use_skill
- BYTE bHeader;
- DWORD dwVnum;
- DWORD dwVID;
- struct command_target
- BYTE header;
- DWORD dwVID;
- struct packet_target
- BYTE header;
- DWORD dwVID;
- BYTE bHPPercent;
- struct packet_warp
- BYTE bHeader;
- long lX;
- long lY;
- long lAddr;
- WORD wPort;
- struct command_warp
- BYTE bHeader;
- struct packet_quest_info
- BYTE header;
- WORD size;
- WORD index;
- BYTE flag;
- enum
- MESSENGER_SUBHEADER_GC_LIST,
- MESSENGER_SUBHEADER_GC_LOGIN,
- MESSENGER_SUBHEADER_GC_LOGOUT,
- MESSENGER_SUBHEADER_GC_INVITE,
- struct packet_messenger
- BYTE header;
- WORD size;
- BYTE subheader;
- struct packet_messenger_guild_list
- BYTE connected;
- BYTE length;
- struct packet_messenger_guild_login
- BYTE length;
- struct packet_messenger_guild_logout
- BYTE length;
- struct packet_messenger_list_offline
- BYTE connected; // always 0
- BYTE length;
- struct packet_messenger_list_online
- BYTE connected; // always 1
- BYTE length;
- enum
- MESSENGER_SUBHEADER_CG_ADD_BY_VID,
- MESSENGER_SUBHEADER_CG_ADD_BY_NAME,
- MESSENGER_SUBHEADER_CG_REMOVE,
- MESSENGER_SUBHEADER_CG_INVITE_ANSWER,
- struct command_messenger
- BYTE header;
- BYTE subheader;
- struct command_messenger_add_by_vid
- DWORD vid;
- struct command_messenger_add_by_name
- BYTE length;
- struct command_messenger_remove
- char login[LOGIN_MAX_LEN+1];
- struct command_safebox_checkout
- BYTE bHeader;
- BYTE bSafePos;
- TItemPos ItemPos;
- struct command_safebox_checkin
- BYTE bHeader;
- BYTE bSafePos;
- TItemPos ItemPos;
- struct command_party_parameter
- BYTE bHeader;
- BYTE bDistributeMode;
- struct paryt_parameter
- BYTE bHeader;
- BYTE bDistributeMode;
- struct packet_party_add
- BYTE header;
- DWORD pid;
- char name[CHARACTER_NAME_MAX_LEN+1];
- struct command_party_invite
- BYTE header;
- DWORD vid;
- struct packet_party_invite
- BYTE header;
- DWORD leader_vid;
- struct command_party_invite_answer
- BYTE header;
- DWORD leader_vid;
- BYTE accept;
- struct packet_party_update
- BYTE header;
- DWORD pid;
- BYTE role;
- BYTE percent_hp;
- short affects[7];
- struct packet_party_remove
- BYTE header;
- DWORD pid;
- struct packet_party_link
- BYTE header;
- DWORD pid;
- DWORD vid;
- struct packet_party_unlink
- BYTE header;
- DWORD pid;
- DWORD vid;
- struct command_party_remove
- BYTE header;
- DWORD pid;
- struct command_party_set_state
- BYTE header;
- DWORD pid;
- BYTE byRole;
- BYTE flag;
- enum
- PARTY_SKILL_HEAL = 1,
- PARTY_SKILL_WARP = 2
- struct command_party_use_skill
- BYTE header;
- BYTE bySkillIndex;
- DWORD vid;
- struct packet_safebox_size
- BYTE bHeader;
- BYTE bSize;
- struct packet_safebox_wrong_password
- BYTE bHeader;
- struct command_empire
- BYTE bHeader;
- BYTE bEmpire;
- struct packet_empire
- BYTE bHeader;
- BYTE bEmpire;
- enum
- SAFEBOX_MONEY_STATE_SAVE,
- SAFEBOX_MONEY_STATE_WITHDRAW,
- struct command_safebox_money
- BYTE bHeader;
- BYTE bState;
- long lMoney;
- struct packet_safebox_money_change
- BYTE bHeader;
- long lMoney;
- enum
- GUILD_SUBHEADER_GC_LOGIN,
- GUILD_SUBHEADER_GC_LOGOUT,
- GUILD_SUBHEADER_GC_LIST,
- GUILD_SUBHEADER_GC_GRADE,
- GUILD_SUBHEADER_GC_ADD,
- GUILD_SUBHEADER_GC_REMOVE,
- GUILD_SUBHEADER_GC_GRADE_NAME,
- GUILD_SUBHEADER_GC_GRADE_AUTH,
- GUILD_SUBHEADER_GC_INFO,
- GUILD_SUBHEADER_GC_COMMENTS,
- GUILD_SUBHEADER_GC_CHANGE_EXP,
- GUILD_SUBHEADER_GC_CHANGE_MEMBER_GRADE,
- GUILD_SUBHEADER_GC_SKILL_INFO,
- GUILD_SUBHEADER_GC_CHANGE_MEMBER_GENERAL,
- GUILD_SUBHEADER_GC_GUILD_INVITE,
- GUILD_SUBHEADER_GC_WAR,
- GUILD_SUBHEADER_GC_GUILD_NAME,
- GUILD_SUBHEADER_GC_GUILD_WAR_LIST,
- GUILD_SUBHEADER_GC_GUILD_WAR_END_LIST,
- GUILD_SUBHEADER_GC_WAR_SCORE,
- GUILD_SUBHEADER_GC_MONEY_CHANGE,
- enum GUILD_SUBHEADER_CG
- GUILD_SUBHEADER_CG_ADD_MEMBER,
- GUILD_SUBHEADER_CG_REMOVE_MEMBER,
- GUILD_SUBHEADER_CG_CHANGE_GRADE_NAME,
- GUILD_SUBHEADER_CG_CHANGE_GRADE_AUTHORITY,
- GUILD_SUBHEADER_CG_OFFER,
- GUILD_SUBHEADER_CG_POST_COMMENT,
- GUILD_SUBHEADER_CG_DELETE_COMMENT,
- GUILD_SUBHEADER_CG_REFRESH_COMMENT,
- GUILD_SUBHEADER_CG_CHANGE_MEMBER_GRADE,
- GUILD_SUBHEADER_CG_USE_SKILL,
- GUILD_SUBHEADER_CG_CHANGE_MEMBER_GENERAL,
- GUILD_SUBHEADER_CG_GUILD_INVITE_ANSWER,
- GUILD_SUBHEADER_CG_CHARGE_GSP,
- GUILD_SUBHEADER_CG_DEPOSIT_MONEY,
- GUILD_SUBHEADER_CG_WITHDRAW_MONEY,
- struct packet_guild
- BYTE header;
- WORD size;
- BYTE subheader;
- struct packet_guild_name_t
- BYTE header;
- WORD size;
- BYTE subheader;
- DWORD guildID;
- char guildName[GUILD_NAME_MAX_LEN];
- struct packet_guild_war
- DWORD dwGuildSelf;
- DWORD dwGuildOpp;
- BYTE bType;
- BYTE bWarState;
- struct command_guild
- BYTE header;
- BYTE subheader;
- struct command_guild_answer_make_guild
- BYTE header;
- char guild_name[GUILD_NAME_MAX_LEN+1];
- struct command_guild_use_skill
- DWORD dwVnum;
- DWORD dwPID;
- struct command_mark_login
- BYTE header;
- DWORD handle;
- DWORD random_key;
- struct command_mark_upload
- BYTE header;
- DWORD gid;
- BYTE image[16*12*4];
- struct command_mark_idxlist
- BYTE header;
- struct command_mark_crclist
- BYTE header;
- BYTE imgIdx;
- DWORD crclist[80];
- struct packet_mark_idxlist
- BYTE header;
- DWORD bufSize;
- WORD count;
- struct packet_mark_block
- BYTE header;
- DWORD bufSize;
- BYTE imgIdx;
- DWORD count;
- struct command_symbol_upload
- BYTE header;
- WORD size;
- DWORD guild_id;
- struct command_symbol_crc
- BYTE header;
- DWORD guild_id;
- DWORD crc;
- DWORD size;
- struct packet_symbol_data
- BYTE header;
- WORD size;
- DWORD guild_id;
- struct command_fishing
- BYTE header;
- BYTE dir;
- struct packet_fishing
- BYTE header;
- BYTE subheader;
- DWORD info;
- BYTE dir;
- enum
- FISHING_SUBHEADER_GC_START,
- FISHING_SUBHEADER_GC_STOP,
- FISHING_SUBHEADER_GC_REACT,
- FISHING_SUBHEADER_GC_SUCCESS,
- FISHING_SUBHEADER_GC_FAIL,
- FISHING_SUBHEADER_GC_FISH,
- struct command_give_item
- BYTE byHeader;
- DWORD dwTargetVID;
- TItemPos ItemPos;
- BYTE byItemCount;
- struct SPacketCGHack
- BYTE bHeader;
- char szBuf[255 + 1];
- enum
- DUNGEON_SUBHEADER_GC_TIME_ATTACK_START = 0,
- DUNGEON_SUBHEADER_GC_DESTINATION_POSITION = 1,
- struct packet_dungeon
- BYTE bHeader;
- WORD size;
- BYTE subheader;
- struct packet_dungeon_dest_position
- long x;
- long y;
- struct SPacketGCShopSign
- BYTE bHeader;
- DWORD dwVID;
- char szSign[SHOP_SIGN_MAX_LEN + 1];
- struct SPacketCGMyShop
- BYTE bHeader;
- char szSign[SHOP_SIGN_MAX_LEN + 1];
- BYTE bCount;
- struct SPacketGCTime
- BYTE bHeader;
- time_t time;
- enum
- WALKMODE_RUN,
- WALKMODE_WALK,
- struct SPacketGCWalkMode
- BYTE header;
- DWORD vid;
- BYTE mode;
- struct SPacketGCChangeSkillGroup
- BYTE header;
- BYTE skill_group;
- struct SPacketCGRefine
- BYTE header;
- BYTE pos;
- BYTE type;
- struct SPacketCGRequestRefineInfo
- BYTE header;
- BYTE pos;
- struct SPacketGCRefineInformaion
- BYTE header;
- BYTE type;
- BYTE pos;
- DWORD src_vnum;
- DWORD result_vnum;
- BYTE material_count;
- int cost;
- int prob;
- TRefineMaterial materials[REFINE_MATERIAL_MAX_NUM];
- struct TNPCPosition
- BYTE bType;
- char name[CHARACTER_NAME_MAX_LEN+1];
- long x;
- long y;
- struct SPacketGCNPCPosition
- BYTE header;
- WORD size;
- WORD count;
- struct SPacketGCSpecialEffect
- BYTE header;
- BYTE type;
- DWORD vid;
- struct SPacketCGChangeName
- BYTE header;
- BYTE index;
- char name[CHARACTER_NAME_MAX_LEN+1];
- struct SPacketGCChangeName
- BYTE header;
- DWORD pid;
- char name[CHARACTER_NAME_MAX_LEN+1];
- struct command_client_version
- BYTE header;
- char filename[32+1];
- char timestamp[32+1];
- struct command_client_version2
- BYTE header;
- char filename[32+1];
- char timestamp[32+1];
- struct packet_channel
- BYTE header;
- BYTE channel;
- struct pakcet_view_equip //Tippfehler - In jedem Source falsch ?^^
- BYTE header;
- DWORD vid;
- struct
- DWORD vnum;
- BYTE count;
- long alSockets[ITEM_SOCKET_MAX_NUM];
- TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
- } equips[WEAR_MAX_NUM];
- struct
- DWORD dwID;
- long x, y;
- long width, height;
- DWORD dwGuildID;
- struct packet_land_list
- BYTE header;
- WORD size;
- struct
- BYTE bHeader;
- long lID;
- char szName[32+1];
- DWORD dwVID;
- BYTE bType;
- struct
- BYTE bHeader;
- long lID;
- long lX, lY;
- struct
- BYTE bHeader;
- long lID;
- struct
- BYTE bHeader;
- TPacketAffectElement elem;
- struct
- BYTE bHeader;
- DWORD dwType;
- BYTE bApplyOn;
- struct packet_lover_info
- BYTE header;
- char name[CHARACTER_NAME_MAX_LEN + 1];
- BYTE love_point;
- struct packet_love_point_update
- BYTE header;
- BYTE love_point;
- struct packet_dig_motion
- BYTE header;
- DWORD vid;
- DWORD target_vid;
- BYTE count;
- struct command_script_select_item
- BYTE header;
- DWORD selection;
- struct packet_damage_info
- BYTE header;
- DWORD dwVID;
- BYTE flag;
- int damage;
- struct tag_GGSiege
- BYTE bHeader;
- BYTE bEmpire;
- BYTE bTowerCount;
- struct SPacketGGCheckAwakeness
- BYTE bHeader;
- #define MAX_EFFECT_FILE_NAME 128
- struct SPacketGCSpecificEffect
- BYTE header;
- DWORD vid;
- char effect_file[MAX_EFFECT_FILE_NAME];
- enum EDragonSoulRefineWindowRefineType
- DragonSoulRefineWindow_UPGRADE,
- DragonSoulRefineWindow_IMPROVEMENT,
- DragonSoulRefineWindow_REFINE,
- enum EPacketCGDragonSoulSubHeaderType
- DS_SUB_HEADER_OPEN,
- DS_SUB_HEADER_CLOSE,
- DS_SUB_HEADER_DO_REFINE_GRADE,
- DS_SUB_HEADER_DO_REFINE_STEP,
- DS_SUB_HEADER_DO_REFINE_STRENGTH,
- DS_SUB_HEADER_REFINE_FAIL,
- DS_SUB_HEADER_REFINE_FAIL_MAX_REFINE,
- DS_SUB_HEADER_REFINE_FAIL_INVALID_MATERIAL,
- DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MONEY,
- DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MATERIAL,
- DS_SUB_HEADER_REFINE_FAIL_TOO_MUCH_MATERIAL,
- DS_SUB_HEADER_REFINE_SUCCEED,
- struct SPacketCGDragonSoulRefine
- SPacketCGDragonSoulRefine() : header (HEADER_CG_DRAGON_SOUL_REFINE)
- BYTE header;
- BYTE bSubType;
- TItemPos ItemGrid[DRAGON_SOUL_REFINE_GRID_SIZE];
- struct SPacketGCDragonSoulRefine
- SPacketGCDragonSoulRefine() : header^(HEADER_GC_DRAGON_SOUL_REFINE)
- BYTE header;
- BYTE bSubType;
- TItemPos Pos;
- struct SPacketCGStateCheck
- BYTE header;
- unsigned long key;
- unsigned long index;
- struct SPacketGCStateCheck
- BYTE header;
- unsigned long key;
- unsigned long index;
- unsigned char state;
- packet_info.h
- struct SPacketElement
- int iSize;
- std::string stName;
- int iCalled;
- DWORD dwLoad;
- bool bSequencePacket;
- class CPacketInfo
- CPacketInfo();
- void Set(int header, int size, const char * c_pszName, bool bSeq=false);
- bool Get(int header, int * size, const char ** c_ppszName);
- void Start();
- void End();
- void Log(const char * c_pszFileName);
- bool IsSequence(int header);
- void SetSequence(int header, bool bSeq);
- TPacketElement * GetElement(int header);
- std::map<int, TPacketElement *> m_pPacketMap;
- TPacketElement * m_pCurrentPacket;
- DWORD m_dwStartTime;
- class CPacketInfoCG : public CPacketInfo
- CPacketInfoCG();
- class CPacketInfoGG : public CPacketInfo
- CPacketInfoGG();
- class CPacketInfoUDP : public CPacketInfo
- CPacketInfoUDP();
- party.h
- enum // unit : minute
- PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS = 60,
- PARTY_HEAL_COOLTIME_LONG = 60,
- PARTY_HEAL_COOLTIME_SHORT = 30,
- PARTY_MAX_MEMBER = 8,
- PARTY_DEFAULT_RANGE = 5000,
- enum EPartyRole
- PARTY_ROLE_NORMAL,
- PARTY_ROLE_LEADER,
- PARTY_ROLE_ATTACKER,
- PARTY_ROLE_TANKER,
- PARTY_ROLE_BUFFER,
- PARTY_ROLE_SKILL_MASTER,
- PARTY_ROLE_HASTE,
- PARTY_ROLE_DEFENDER,
- PARTY_ROLE_MAX_NUM,
- enum EPartyExpDistributionModes
- PARTY_EXP_DISTRIBUTION_NON_PARITY,
- PARTY_EXP_DISTRIBUTION_PARITY,
- PARTY_EXP_DISTRIBUTION_MAX_NUM
- class CParty;
- class CDungeon;
- class CPartyManager : public singleton<CPartyManager>
- typedef std::map<DWORD, LPPARTY> TPartyMap;
- typedef std::set<LPPARTY> TPCPartySet;
- CPartyManager();
- void Initialize();
- void EnablePCParty() { m_bEnablePCParty = true; sys_log(0,"PARTY Enable"); }
- void DisablePCParty() { m_bEnablePCParty = false; sys_log(0,"PARTY Disable"); }
- bool IsEnablePCParty() { return m_bEnablePCParty; }
- LPPARTY CreateParty(LPCHARACTER pkLeader);
- void DeleteParty(LPPARTY pParty);
- void DeleteAllParty();
- bool SetParty(LPCHARACTER pkChr);
- void SetPartyMember(DWORD dwPID, LPPARTY pParty);
- void P2PLogin(DWORD pid, const char* name);
- void P2PLogout(DWORD pid);
- LPPARTY P2PCreateParty(DWORD pid);
- void P2PDeleteParty(DWORD pid);
- void P2PJoinParty(DWORD leader, DWORD pid, BYTE role = 0);
- void P2PQuitParty(DWORD pid);
- TPartyMap m_map_pkParty;
- TPartyMap m_map_pkMobParty;
- TPCPartySet m_set_pkPCParty;
- bool m_bEnablePCParty;
- enum EPartyMessages
- PM_ATTACK, // Attack him
- PM_RETURN, // Return back to position
- PM_ATTACKED_BY, // I was attacked by someone
- PM_AGGRO_INCREASE, // My aggro is increased
- class CParty
- struct SMember
- LPCHARACTER pCharacter;
- bool bNear;
- BYTE bRole;
- BYTE bLevel;
- std::string strName;
- std::map<DWORD, TMember> TMemberMap;
- std::map<std::string, int> TFlagMap;
- CParty();
- void P2PJoin(DWORD dwPID);
- void P2PQuit(DWORD dwPID);
- virtual void Join(DWORD dwPID);
- void Quit(DWORD dwPID);
- void Link(LPCHARACTER pkChr);
- void Unlink(LPCHARACTER pkChr);
- void ChatPacketToAllMember(BYTE type, const char* format, ...);
- void UpdateOnlineState(DWORD dwPID, const char* name);
- void UpdateOfflineState(DWORD dwPID);
- DWORD GetLeaderPID();
- LPCHARACTER GetLeaderCharacter();
- LPCHARACTER GetLeader() { return m_pkChrLeader; }
- DWORD GetMemberCount();
- DWORD GetNearMemberCount() { return m_iCountNearPartyMember; }
- bool IsMember(DWORD pid) { return m_memberMap.find(pid) != m_memberMap.end(); }
- bool IsNearLeader(DWORD pid);
- bool IsPositionNearLeader(LPCHARACTER ch);
- void SendMessage(LPCHARACTER ch, BYTE bMsg, DWORD dwArg1, DWORD dwArg2);
- void SendPartyJoinOneToAll(DWORD dwPID);
- void SendPartyJoinAllToOne(LPCHARACTER ch);
- void SendPartyRemoveOneToAll(DWORD dwPID);
- void SendPartyInfoOneToAll(DWORD pid);
- void SendPartyInfoOneToAll(LPCHARACTER ch);
- void SendPartyInfoAllToOne(LPCHARACTER ch);
- void SendPartyLinkOneToAll(LPCHARACTER ch);
- void SendPartyLinkAllToOne(LPCHARACTER ch);
- void SendPartyUnlinkOneToAll(LPCHARACTER ch);
- int GetPartyBonusExpPercent() { return m_iExpBonus; }
- int GetPartyBonusAttackGrade() { return m_iAttBonus; }
- int GetPartyBonusDefenseGrade() { return m_iDefBonus; }
- int ComputePartyBonusExpPercent();
- inline int ComputePartyBonusAttackGrade();
- inline int ComputePartyBonusDefenseGrade();
- template <class Func> void ForEachMember(Func & f);
- template <class Func> void ForEachMemberPtr(Func & f);
- template <class Func> void ForEachOnlineMember(Func & f);
- template <class Func> void ForEachNearMember(Func & f);
- template <class Func> void ForEachOnMapMember (Func & f, long lMapIndex);
- template <class Func> bool ForEachOnMapMemberBool (Func & f, long lMapIndex);
- void Update();
- int GetExpBonusPercent();
- bool SetRole(DWORD pid, BYTE bRole, bool on);
- BYTE GetRole(DWORD pid);
- bool IsRole(DWORD pid, BYTE bRole);
- BYTE GetMemberMaxLevel();
- BYTE GetMemberMinLevel();
- void ComputeRolePoint(LPCHARACTER ch, BYTE bRole, bool bAdd);
- void HealParty();
- void SummonToLeader(DWORD pid);
- void SetPCParty(bool b) { m_bPCParty = b; }
- LPCHARACTER GetNextOwnership(LPCHARACTER ch, long x, long y);
- void SetFlag(const std::string& name, int value);
- int GetFlag(const std::string& name);
- void SetDungeon(LPDUNGEON pDungeon);
- LPDUNGEON GetDungeon();
- BYTE CountMemberByVnum(DWORD dwVnum);
- void SetParameter(int iMode);
- int GetExpDistributionMode();
- void SetExpCentralizeCharacter(DWORD pid);
- LPCHARACTER GetExpCentralizeCharacter();
- void RequestSetMemberLevel(DWORD pid, BYTE level);
- void P2PSetMemberLevel(DWORD pid, BYTE level);
- void IncreaseOwnership();
- virtual void Initialize();
- void Destroy();
- void RemovePartyBonus();
- void RemoveBonus();
- void RemoveBonusForOne(DWORD pid);
- void SendParameter(LPCHARACTER ch);
- void SendParameterToAll();
- TMemberMap m_memberMap;
- DWORD m_dwLeaderPID;
- LPCHARACTER m_pkChrLeader;
- LPEVENT m_eventUpdate;
- TMemberMap::iterator m_itNextOwner;
- int m_iExpDistributionMode;
- LPCHARACTER m_pkChrExpCentralize;
- DWORD m_dwPartyStartTime;
- DWORD m_dwPartyHealTime;
- bool m_bPartyHealReady;
- bool m_bCanUsePartyHeal;
- int m_anRoleCount[PARTY_ROLE_MAX_NUM];
- int m_anMaxRole[PARTY_ROLE_MAX_NUM];
- int m_iLongTimeExpBonus;
- int m_iLeadership;
- int m_iExpBonus;
- int m_iAttBonus;
- int m_iDefBonus;
- int m_iCountNearPartyMember;
- bool m_bPCParty;
- TFlagMap m_map_iFlag;
- LPDUNGEON m_pkDungeon;
- LPDUNGEON m_pkDungeon_for_Only_party;
- void SetDungeon_for_Only_party(LPDUNGEON pDungeon);
- LPDUNGEON GetDungeon_for_Only_party();
- template <class Func> void CParty::ForEachMember(Func & f)
- template <class Func> void CParty::ForEachMemberPtr(Func & f)
- template <class Func> void CParty::ForEachOnlineMember(Func & f)
- template <class Func> void CParty::ForEachNearMember(Func & f)
- template <class Func> void CParty::ForEachOnMapMember (Func & f, long lMapIndex)
- template <class Func> bool CParty::ForEachOnMapMemberBool(Func & f, long lMapIndex)
- inline int CParty::ComputePartyBonusAttackGrade()
- inline int CParty::ComputePartyBonusDefenseGrade()
- PetSystem.h
- class CHARACTER;
- class CPetActor //: public CHARACTER
- enum EPetOptions
- EPetOption_Followable = 1 << 0,
- EPetOption_Mountable = 1 << 1,
- EPetOption_Summonable = 1 << 2,
- EPetOption_Combatable = 1 << 3,
- friend class CPetSystem;
- CPetActor(LPCHARACTER owner, DWORD vnum, DWORD options = EPetOption_Followable | EPetOption_Summonable);
- virtual bool Update(DWORD deltaTime);
- virtual bool _UpdateFollowAI();
- virtual bool _UpdatAloneActionAI(float fMinDist, float fMaxDist);
- bool Follow(float fMinDistance = 50.f);
- LPCHARACTER GetCharacter() const
- LPCHARACTER GetOwner() const
- DWORD GetVID() const
- DWORD GetVnum() const
- bool HasOption(EPetOptions option) const
- void SetName(const char* petName);
- bool Mount();
- void Unmount();
- DWORD Summon(const char* petName, LPITEM pSummonItem, bool bSpawnFar = false);
- void Unsummon();
- bool IsSummoned() const
- void SetSummonItem (LPITEM pItem);
- DWORD GetSummonItemVID () { return m_dwSummonItemVID; }
- void GiveBuff();
- void ClearBuff();
- DWORD m_dwVnum;
- DWORD m_dwVID;
- DWORD m_dwOptions;
- DWORD m_dwLastActionTime;
- DWORD m_dwSummonItemVID;
- DWORD m_dwSummonItemVnum;
- short m_originalMoveSpeed;
- std::string m_name;
- LPCHARACTER m_pkChar; // Instance of pet(CHARACTER)
- LPCHARACTER m_pkOwner;
- class CPetSystem
- boost::unordered_map<DWORD, CPetActor*> TPetActorMap;
- CPetSystem(LPCHARACTER owner);
- CPetActor* GetByVID(DWORD vid) const;
- CPetActor* GetByVnum(DWORD vnum) const;
- bool Update(DWORD deltaTime);
- void Destroy();
- size_t CountSummoned() const;
- void SetUpdatePeriod(DWORD ms);
- CPetActor* Summon(DWORD mobVnum, LPITEM pSummonItem, const char* petName, bool bSpawnFar, DWORD options = CPetActor::EPetOption_Followable | CPetActor::EPetOption_Summonable);
- void Unsummon(DWORD mobVnum, bool bDeleteFromList = false);
- void Unsummon(CPetActor* petActor, bool bDeleteFromList = false);
- CPetActor* AddPet(DWORD mobVnum, const char* petName, const SPetAbility& ability, DWORD options = CPetActor::EPetOption_Followable | CPetActor::EPetOption_Summonable | CPetActor::EPetOption_Combatable);
- void DeletePet(DWORD mobVnum);
- void DeletePet(CPetActor* petActor);
- void RefreshBuff();
- TPetActorMap m_petActorMap;
- LPCHARACTER m_pkOwner;
- DWORD m_dwUpdatePeriod;
- DWORD m_dwLastUpdateTime;
- LPEVENT m_pkPetSystemUpdateEvent;
- polymorph.h
- enum POLYMORPH_BONUS_TYPE
- POLYMORPH_NO_BONUS,
- POLYMORPH_ATK_BONUS,
- POLYMORPH_DEF_BONUS,
- POLYMORPH_SPD_BONUS,
- class CPolymorphUtils : public singleton<CPolymorphUtils>
- boost::unordered_map<DWORD, DWORD> m_mapSPDType;
- boost::unordered_map<DWORD, DWORD> m_mapATKType;
- boost::unordered_map<DWORD, DWORD> m_mapDEFType;
- CPolymorphUtils();
- POLYMORPH_BONUS_TYPE GetBonusType(DWORD dwVnum);
- bool PolymorphCharacter(LPCHARACTER pChar, LPITEM pItem, const CMob* pMob);
- bool UpdateBookPracticeGrade(LPCHARACTER pChar, LPITEM pItem);
- bool GiveBook(LPCHARACTER pChar, DWORD dwMobVnum, DWORD dwPracticeCount, BYTE BookLevel, BYTE LevelLimit);
- bool BookUpgrade(LPCHARACTER pChar, LPITEM pItem);
- priv_manager.h
- class CPrivManager : public singleton<CPrivManager>
- CPrivManager();
- void RequestGiveGuildPriv(DWORD guild_id, BYTE type, int value, time_t dur_time_sec);
- void RequestGiveEmpirePriv(BYTE empire, BYTE type, int value, time_t dur_time_sec);
- void RequestGiveCharacterPriv(DWORD pid, BYTE type, int value);
- void GiveGuildPriv(DWORD guild_id, BYTE type, int value, BYTE bLog, time_t end_time_sec);
- void GiveEmpirePriv(BYTE empire, BYTE type, int value, BYTE bLog, time_t end_time_sec);
- void GiveCharacterPriv(DWORD pid, BYTE type, int value, BYTE bLog);
- void RemoveGuildPriv(DWORD guild_id, BYTE type);
- void RemoveEmpirePriv(BYTE empire, BYTE type);
- void RemoveCharacterPriv(DWORD pid, BYTE type);
- int GetPriv(LPCHARACTER ch, BYTE type);
- int GetPrivByEmpire(BYTE bEmpire, BYTE type);
- int GetPrivByGuild(DWORD guild_id, BYTE type);
- int GetPrivByCharacter(DWORD pid, BYTE type);
- struct SPrivEmpireData
- SPrivEmpireData* GetPrivByEmpireEx(BYTE bEmpire, BYTE type);
- struct SPrivGuildData
- const SPrivGuildData* GetPrivByGuildEx( DWORD dwGuildID, BYTE byType ) const;
- SPrivEmpireData m_aakPrivEmpireData[MAX_PRIV_NUM][EMPIRE_MAX_NUM];
- std::map<DWORD, SPrivGuildData> m_aPrivGuild[MAX_PRIV_NUM];
- std::map<DWORD, int> m_aPrivChar[MAX_PRIV_NUM];
- profiler.h
- class CProfiler : public singleton<CProfiler>
- enum
- STACK_DATA_MAX_NUM = 64,
- struct SProfileStackData
- int iCallStep;
- long iStartTime;
- long iEndTime;
- std::string strName;
- struct SProfileAccumData
- int iStartTime;
- int iCallingCount;
- int iCollapsedTime;
- int iDepth;
- std::string strName;
- struct stringhash
- size_t operator () (const std::string& str) const
- boost::unordered_map<std::string, TProfileAccumData> TProfileAccumDataMap;
- CProfiler()
- Initialize();
- void Clear()
- void Push(const char * c_szName)
- void Pop(const char * c_szName)
- void PushAccum(const char * c_szName)
- auto it = m_ProfileAccumDataMap.find(c_szName);
- void PopAccum(const char * c_szName)
- void Log(const char * c_pszFileName)
- void Print(FILE * fp = stderr)
- void PrintOneStackData(const char * c_szName)
- void PrintOneAccumData(const char * c_szName)
- bool GetProfileStackDataPointer(const char * c_szName, TProfileStackData ** ppProfileStackData)
- int m_ProfileStackDataCount;
- TProfileStackData m_ProfileStackDatas[STACK_DATA_MAX_NUM];
- TProfileAccumDataMap m_ProfileAccumDataMap;
- std::vector<TProfileAccumData *> m_vec_Accum;
- int m_iAccumDepth;
- int m_iCallStep;
- template <typename T> class CProfileUnit
- CProfileUnit(const char * c_pszName)
- m_stName = c_pszName;
- CProfiler::instance().PushAccum(m_stName.c_str());
- m_bPushed = true;
- void Pop()
- std::string m_stName;
- bool m_bPushed;
- protocol.h
- const char *encode_byte(char ind)
- const char *encode_2bytes(sh_int ind)
- const char *encode_4bytes(int ind)
- BYTE decode_byte(const void * a)
- WORD decode_2bytes(const void * a)
- INT decode_4bytes(const void *a)
- #define packet_encode(buf, data, len) __packet_encode(buf, data, len, __FILE__, __LINE__)
- #define DEFAULT_PACKET_BUFFER_SIZE 65536
- inline bool __packet_encode(LPBUFFER pbuf, const void * data, int length, const char * file, int line)
- pvp.h
- class CHARACTER;
- class CPVP
- friend class CPVPManager;
- struct _player
- DWORD dwPID;
- DWORD dwVID;
- bool bAgree;
- bool bCanRevenge;
- _player() : dwPID(0), dwVID(0), bAgree(false), bCanRevenge(false)
- CPVP(DWORD dwID1, DWORD dwID2);
- CPVP(CPVP & v);
- void Win(DWORD dwPID);
- bool CanRevenge(DWORD dwPID);
- bool IsFight();
- bool Agree(DWORD dwPID);
- void SetVID(DWORD dwPID, DWORD dwVID);
- void Packet(bool bDelete = false);
- void SetLastFightTime();
- DWORD GetLastFightTime();
- DWORD GetCRC() { return m_dwCRC; }
- TPlayer m_players[2];
- DWORD m_dwCRC;
- bool m_bRevenge;
- DWORD m_dwLastFightTime;
- class CPVPManager : public singleton<CPVPManager>
- std::map<DWORD, TR1_NS::unordered_set<CPVP*> > CPVPSetMap;
- CPVPManager();
- void Insert(LPCHARACTER pkChr, LPCHARACTER pkVictim);
- bool CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim);
- bool Dead(LPCHARACTER pkChr, DWORD dwKillerPID);
- void GiveUp(LPCHARACTER pkChr, DWORD dwKillerPID);
- void Connect(LPCHARACTER pkChr);
- void Disconnect(LPCHARACTER pkChr);
- void SendList(LPDESC d);
- void Delete(CPVP * pkPVP);
- void Process();
- CPVP * Find(DWORD dwCRC);
- void ConnectEx(LPCHARACTER pkChr, bool bDisconnect);
- std::map<DWORD, CPVP *> m_map_pkPVP;
- CPVPSetMap m_map_pkPVPSetByID;
- quest.h
- enum
- QUEST_NO_NPC,
- QUEST_ATTR_NPC_START = 100000,
- QUEST_ATTR0_NPC = QUEST_ATTR_NPC_START,
- QUEST_ATTR1_NPC = 100000,
- QUEST_ATTR2_NPC = 100001,
- QUEST_ATTR3_NPC = 100002,
- QUEST_ATTR4_NPC = 100003,
- QUEST_ATTR5_NPC = 100004,
- QUEST_ATTR6_NPC = 100005,
- QUEST_ATTR7_NPC = 100006,
- QUEST_ATTR8_NPC = 100007,
- QUEST_ATTR9_NPC = 100008,
- QUEST_ATTR10_NPC = 100009,
- QUEST_ATTR11_NPC = 100010,
- QUEST_ATTR12_NPC = 100011,
- QUEST_ATTR13_NPC = 100012,
- QUEST_ATTR14_NPC = 100013,
- QUEST_ATTR15_NPC = 100014,
- enum
- QUEST_CLICK_EVENT,
- QUEST_KILL_EVENT,
- QUEST_TIMER_EVENT,
- QUEST_LEVELUP_EVENT,
- QUEST_LOGIN_EVENT,
- QUEST_LOGOUT_EVENT,
- QUEST_BUTTON_EVENT,
- QUEST_INFO_EVENT,
- QUEST_CHAT_EVENT,
- QUEST_ATTR_IN_EVENT,
- QUEST_ATTR_OUT_EVENT,
- QUEST_ITEM_USE_EVENT,
- QUEST_SERVER_TIMER_EVENT,
- QUEST_ENTER_STATE_EVENT,
- QUEST_LEAVE_STATE_EVENT,
- QUEST_LETTER_EVENT,
- QUEST_ITEM_TAKE_EVENT,
- QUEST_TARGET_EVENT,
- QUEST_PARTY_KILL_EVENT,
- QUEST_UNMOUNT_EVENT,
- QUEST_ITEM_PICK_EVENT,
- QUEST_SIG_USE_EVENT,
- QUEST_ITEM_INFORMER_EVENT,
- QUEST_EVENT_COUNT
- enum
- SUSPEND_STATE_NONE,
- SUSPEND_STATE_PAUSE,
- SUSPEND_STATE_SELECT,
- SUSPEND_STATE_INPUT,
- SUSPEND_STATE_CONFIRM,
- SUSPEND_STATE_SELECT_ITEM,
- enum EQuestConfirmType
- CONFIRM_NO,
- CONFIRM_YES,
- CONFIRM_TIMEOUT,
- struct AStateScriptType
- int GetSize() const { return m_code.size(); }
- const char* GetCode() const { return &m_code[0]; }
- std::vector<char> m_code;
- struct AArgScript
- std::string arg;
- std::vector<char> when_condition;
- AStateScriptType script;
- unsigned int quest_index;
- int state_index;
- AArgScript(): quest_index(0), state_index(0)
- struct QuestState
- lua_State * co;
- int ico;
- short int args;
- BYTE suspend_state;
- int iIndex;
- bool bStart;
- int st;
- std::string _title;
- std::string _clock_name;
- std::string _counter_name;
- int _clock_value;
- int _counter_value;
- std::string _icon_file;
- std::vector<AArgScript *> chat_scripts;
- QuestState(): co(NULL), ico(0), args(0), suspend_state(SUSPEND_STATE_NONE), iIndex(0), bStart(false), st(-1),_clock_value(0), _counter_value(0)
- questevent.h
- EVENTINFO(quest_server_event_info)
- int time_cycle;
- unsigned int npc_id;
- unsigned int arg;
- char* name;
- quest_server_event_info()
- EVENTINFO(quest_event_info)
- int time_cycle;
- unsigned int player_id;
- unsigned int npc_id;
- char* name;
- extern LPEVENT quest_create_server_timer_event(const char* name, double when, unsigned int timernpc = QUEST_NO_NPC, bool loop = false, unsigned int arg = 0);
- extern LPEVENT quest_create_timer_event(const char* name, unsigned int player_id, double when, unsigned int npc_id=QUEST_NO_NPC, bool loop = false);
- extern void CancelTimerEvent(LPEVENT* ppEvent);
- questlua.h
- extern void RegisterPCFunctionTable();
- extern void RegisterNPCFunctionTable();
- extern void RegisterTargetFunctionTable();
- extern void RegisterAffectFunctionTable();
- extern void RegisterBuildingFunctionTable();
- extern void RegisterMarriageFunctionTable();
- extern void RegisterITEMFunctionTable();
- extern void RegisterDungeonFunctionTable();
- extern void RegisterQuestFunctionTable();
- extern void RegisterPartyFunctionTable();
- extern void RegisterHorseFunctionTable();
- extern void RegisterPetFunctionTable();
- extern void RegisterGuildFunctionTable();
- extern void RegisterGameFunctionTable();
- extern void RegisterArenaFunctionTable();
- extern void RegisterGlobalFunctionTable(lua_State* L);
- extern void RegisterForkedFunctionTable();
- extern void RegisterOXEventFunctionTable();
- extern void RegisterBattleArenaFunctionTable();
- extern void RegisterDanceEventFunctionTable();
- extern void RegisterDragonLairFunctionTable();
- extern void RegisterDragonSoulFunctionTable();
- extern void combine_lua_string(lua_State* L, std::ostringstream &s);
- struct FSetWarpLocation
- long map_index;
- long x;
- long y;
- FSetWarpLocation (long _map_index, long _x, long _y) :
- struct FSetQuestFlag
- std::string flagname;
- int value;
- struct FPartyCheckFlagLt
- std::string flagname;
- int value;
- struct FPartyChat
- int iChatType;
- const char* str;
- struct FPartyClearReady
- struct FSendPacket
- struct FSendPacketToEmpire
- TEMP_BUFFER buf;
- BYTE bEmpire;
- struct FWarpEmpire
- BYTE m_bEmpire;
- long m_lMapIndexTo;
- long m_x;
- long m_y;
- EVENTINFO(warp_all_to_map_my_empire_event_info)
- BYTE m_bEmpire;
- long m_lMapIndexFrom;
- long m_lMapIndexTo;
- long m_x;
- long m_y;
- warp_all_to_map_my_empire_event_info()
- EVENTFUNC(warp_all_to_map_my_empire_event);
- struct FBuildLuaGuildWarList
- lua_State * L;
- int m_count;
- FBuildLuaGuildWarList(lua_State * L);
- questmanager.h
- class ITEM;
- class CHARACTER;
- class CDungeon;
- bool IsScriptTrue(const char* code, int size);
- string ScriptToString(const string& str);
- class CQuestManager : public singleton<CQuestManager>
- enum
- QUEST_SKIN_NOWINDOW,
- QUEST_SKIN_NORMAL,
- QUEST_SKIN_SCROLL=4,
- QUEST_SKIN_CINEMATIC=5,
- QUEST_SKIN_COUNT
- typedef map<string, int> TEventNameMap;
- typedef map<unsigned int, PC> PCMap;
- CQuestManager();
- bool Initialize();
- void Destroy();
- bool InitializeLua();
- lua_State * GetLuaState() { return L; }
- void AddLuaFunctionTable(const char * c_pszName, luaL_reg * preg);
- TEventNameMap m_mapEventName;
- QuestState OpenState(const string& quest_name, int state_index);
- void CloseState(QuestState& qs);
- bool RunState(QuestState& qs);
- PC * GetPC(unsigned int pc);
- PC * GetPCForce(unsigned int pc);
- unsigned int GetCurrentNPCRace();
- const string & GetCurrentQuestName();
- unsigned int FindNPCIDByName(const string& name);
- LPCHARACTER GetCurrentNPCCharacterPtr();
- void SetCurrentEventIndex(int index) { m_iRunningEventIndex = index; }
- bool UseItem(unsigned int pc, LPITEM item, bool bReceiveAll);
- bool PickupItem(unsigned int pc, LPITEM item);
- bool SIGUse(unsigned int pc, DWORD sig_vnum, LPITEM item, bool bReceiveAll);
- bool TakeItem(unsigned int pc, unsigned int npc, LPITEM item);
- LPITEM GetCurrentItem();
- void ClearCurrentItem();
- void SetCurrentItem(LPITEM item);
- void AddServerTimer(const string& name, DWORD arg, LPEVENT event);
- void ClearServerTimer(const string& name, DWORD arg);
- void ClearServerTimerNotCancel(const string& name, DWORD arg);
- void CancelServerTimers(DWORD arg);
- void SetServerTimerArg(DWORD dwArg);
- DWORD GetServerTimerArg();
- bool ServerTimer(unsigned int npc, unsigned int arg);
- void Login(unsigned int pc, const char * c_pszQuestName = NULL);
- void Logout(unsigned int pc);
- bool Timer(unsigned int pc, unsigned int npc);
- bool Click(unsigned int pc, LPCHARACTER pkNPC);
- void Kill(unsigned int pc, unsigned int npc);
- void LevelUp(unsigned int pc);
- void AttrIn(unsigned int pc, LPCHARACTER ch, int attr);
- void AttrOut(unsigned int pc, LPCHARACTER ch, int attr);
- bool Target(unsigned int pc, DWORD dwQuestIndex, const char * c_pszTargetName, const char * c_pszVerb);
- bool GiveItemToPC(unsigned int pc, LPCHARACTER pkChr);
- void Unmount(unsigned int pc);
- void QuestButton(unsigned int pc, unsigned int quest_index);
- void QuestInfo(unsigned int pc, unsigned int quest_index);
- void EnterState(DWORD pc, DWORD quest_index, int state);
- void LeaveState(DWORD pc, DWORD quest_index, int state);
- void Letter(DWORD pc);
- void Letter(DWORD pc, DWORD quest_index, int state);
- void ItemInformer(unsigned int pc, unsigned int vnum);
- bool CheckQuestLoaded(PC* pc) { return pc && pc->IsLoaded(); }
- void Select(unsigned int pc, unsigned int selection);
- void Resume(unsigned int pc);
- void Input(unsigned int pc, const char* msg);
- void Confirm(unsigned int pc, EQuestConfirmType confirm, unsigned int pc2 = 0);
- void SelectItem(unsigned int pc, unsigned int selection);
- void LogoutPC(LPCHARACTER ch);
- void DisconnectPC(LPCHARACTER ch);
- QuestState * GetCurrentState() { return m_CurrentRunningState; }
- void LoadStartQuest(const string& quest_name, unsigned int idx);
- bool CanStartQuest(unsigned int quest_index, const PC& pc);
- bool CanStartQuest(unsigned int quest_index);
- bool CanEndQuestAtState(const string& quest_name, const string& state_name);
- LPCHARACTER GetCurrentCharacterPtr() { return m_pCurrentCharacter; }
- LPCHARACTER GetCurrentPartyMember() { return m_pCurrentPartyMember; }
- PC * GetCurrentPC() { return m_pCurrentPC; }
- LPDUNGEON GetCurrentDungeon();
- void SelectDungeon(LPDUNGEON pDungeon);
- void ClearScript();
- void SendScript();
- void AddScript(const string& str);
- void BuildStateIndexToName(const char* questName);
- int GetQuestStateIndex(const string& quest_name, const string& state_name);
- const char* GetQuestStateName(const string& quest_name, const int state_index);
- void SetSkinStyle(int iStyle);
- void SetNoSend() { m_bNoSend = true; }
- unsigned int LoadTimerScript(const string& name);
- void RegisterQuest(const string & name, unsigned int idx);
- unsigned int GetQuestIndexByName(const string& name);
- const string& GetQuestNameByIndex(unsigned int idx);
- void RequestSetEventFlag(const string& name, int value);
- void SetEventFlag(const string& name, int value);
- int GetEventFlag(const string& name);
- void BroadcastEventFlagOnLogin(LPCHARACTER ch);
- void SendEventFlagList(LPCHARACTER ch);
- void Reload();
- void SetError() { m_bError = true; }
- void ClearError() { m_bError = false; }
- bool IsError() { return m_bError; }
- void WriteRunningStateToSyserr();
- void QuestError(const char* func, int line, const char* fmt, ...);
- void RegisterNPCVnum(DWORD dwVnum);
- LPDUNGEON m_pSelectedDungeon;
- DWORD m_dwServerTimerArg;
- map<pair<string, DWORD>, LPEVENT> m_mapServerTimer;
- int m_iRunningEventIndex;
- map<string, int> m_mapEventFlag;
- void GotoSelectState(QuestState& qs);
- void GotoPauseState(QuestState& qs);
- void GotoEndState(QuestState& qs);
- void GotoInputState(QuestState& qs);
- void GotoConfirmState(QuestState& qs);
- void GotoSelectItemState(QuestState& qs);
- lua_State * L;
- bool m_bNoSend;
- set<unsigned int> m_registeredNPCVnum;
- map<unsigned int, NPC> m_mapNPC;
- map<string, unsigned int> m_mapNPCNameID;
- map<string, unsigned int> m_mapTimerID;
- QuestState * m_CurrentRunningState;
- PCMap m_mapPC;
- LPCHARACTER m_pCurrentCharacter;
- LPCHARACTER m_pCurrentNPCCharacter;
- LPCHARACTER m_pCurrentPartyMember;
- PC* m_pCurrentPC;
- string m_strScript;
- int m_iCurrentSkin;
- struct stringhash
- typedef boost::unordered_map<string, int, stringhash> THashMapQuestName;
- typedef boost::unordered_map<unsigned int, vector<char> > THashMapQuestStartScript;
- THashMapQuestName m_hmQuestName;
- THashMapQuestStartScript m_hmQuestStartScript;
- map<unsigned int, string> m_mapQuestNameByIndex;
- bool m_bError;
- static bool ExecuteQuestScript(PC& pc, const string& quest_name, const int state, const char* code, const int code_size, vector<AArgScript*>* pChatScripts = NULL, bool bUseCache = true);
- static bool ExecuteQuestScript(PC& pc, DWORD quest_index, const int state, const char* code, const int code_size, vector<AArgScript*>* pChatScripts = NULL, bool bUseCache = true);
- void BeginOtherPCBlock(DWORD pid);
- void EndOtherPCBlock();
- bool IsInOtherPCBlock();
- PC* GetOtherPCBlockRootPC();
- PC* m_pOtherPCBlockRootPC;
- std::vector <DWORD> m_vecPCStack;
- questnpc.h
- enum
- QUEST_START_STATE_INDEX = 0,
- QUEST_CHAT_STATE_INDEX = -1,
- QUEST_FISH_REFINE_STATE_INDEX = -2,
- class PC;
- class NPC
- typedef map<int, AStateScriptType> AQuestScriptType;
- typedef map<unsigned int, AQuestScriptType> QuestMapType;
- typedef map<int, vector<AArgScript> > AArgQuestScriptType;
- typedef map<unsigned int, AArgQuestScriptType> ArgQuestMapType;
- NPC();
- void Set(unsigned int vnum, const string & script_name);
- static bool HasStartState(const AQuestScriptType & q)
- static bool HasStartState(const AArgQuestScriptType& q)
- bool OnServerTimer(PC& pc);
- bool OnClick(PC& pc);
- bool OnKill(PC& pc);
- bool OnPartyKill(PC& pc);
- bool OnTimer(PC& pc);
- bool OnLevelUp(PC& pc);
- bool OnLogin(PC& pc, const char * c_pszQuestName = NULL);
- bool OnLogout(PC& pc);
- bool OnButton(PC& pc, unsigned int quest_index);
- bool OnInfo(PC& pc, unsigned int quest_index);
- bool OnAttrIn(PC& pc);
- bool OnAttrOut(PC& pc);
- bool OnUseItem(PC& pc, bool bReceiveAll);
- bool OnTakeItem(PC& pc);
- bool OnEnterState(PC& pc, DWORD quest_index, int state);
- bool OnLeaveState(PC& pc, DWORD quest_index, int state);
- bool OnLetter(PC& pc, DWORD quest_index, int state);
- bool OnChat(PC& pc);
- bool HasChat();
- bool OnItemInformer(PC& pc,unsigned int vnum);
- bool OnTarget(PC& pc, DWORD dwQuestIndex, const char * c_pszTargetName, const char * c_pszVerb, bool & bRet);
- bool OnUnmount(PC& pc);
- bool OnPickupItem(PC& pc);
- bool OnSIGUse(PC& pc, bool bReceiveAll);
- bool HandleEvent(PC& pc, int EventIndex);
- bool HandleReceiveAllEvent(PC& pc, int EventIndex);
- bool HandleReceiveAllNoWaitEvent(PC& pc, int EventIndex);
- bool ExecuteEventScript(PC& pc, int EventIndex, DWORD dwQuestIndex, int iState);
- unsigned int GetVnum() { return m_vnum; }
- template <typename TQuestMapType, typename FuncMatch, typename FuncMiss>
- void MatchingQuest(PC& pc, TQuestMapType& QuestMap, FuncMatch& fMatch, FuncMiss& fMiss);
- void LoadStateScript(int idx, const char* filename, const char* script_name);
- unsigned int m_vnum;
- QuestMapType m_mapOwnQuest[QUEST_EVENT_COUNT];
- ArgQuestMapType m_mapOwnArgQuest[QUEST_EVENT_COUNT];
- template <typename TQuestMapType, typename FuncMatch, typename FuncMiss>
- void NPC::MatchingQuest(PC& pc, TQuestMapType& QuestMap, FuncMatch& fMatch, FuncMiss& fMiss)
- questpc.h
- class CHARACTER;
- struct RewardData
- enum RewardType
- REWARD_TYPE_NONE,
- REWARD_TYPE_EXP,
- REWARD_TYPE_ITEM,
- DWORD value1;
- int value2;
- RewardData(RewardType t, DWORD value1, int value2 = 0) :
- class PC
- enum
- QUEST_SEND_ISBEGIN = (1 << 0),
- QUEST_SEND_TITLE = (1 << 1),
- QUEST_SEND_CLOCK_NAME = (1 << 2),
- QUEST_SEND_CLOCK_VALUE = (1 << 3),
- QUEST_SEND_COUNTER_NAME = (1 << 4),
- QUEST_SEND_COUNTER_VALUE = (1 << 5),
- QUEST_SEND_ICON_FILE = (1 << 6),
- typedef map<unsigned int, QuestState> QuestInfo;
- typedef QuestInfo::iterator QuestInfoIterator;
- PC();
- void Destroy();
- void SetID(DWORD dwID);
- DWORD GetID() { return m_dwID; }
- bool HasQuest(const string & quest_name);
- QuestState & GetQuest(const string& quest_name);
- inline QuestInfoIterator quest_begin();
- inline QuestInfoIterator quest_end();
- inline QuestInfoIterator quest_find(DWORD quest_index);
- inline bool IsRunning();
- void EndRunning();
- void CancelRunning();
- inline QuestState * GetRunningQuestState();
- void SetQuest(const string& quest_name, QuestState& qs);
- void SetCurrentQuestStateName(const string& state_name);
- void SetQuestState(const string& quest_name, const string& state_name);
- void SetQuestState(const string& quest_name, int new_state_index);
- void ClearQuest(const string& quest_name);
- void AddQuestStateChange(const string& quest_name, int prev_state, int next_state);
- void DoQuestStateChange();
- struct TQuestStateChangeInfo
- DWORD quest_idx;
- int prev_state;
- int next_state;
- TQuestStateChangeInfo(DWORD _quest_idx, int _prev_state, int _next_state) :
- vector<TQuestStateChangeInfo> m_QuestStateChange;
- void SetFlag(const string & name, int value, bool bSkipSave = false);
- int GetFlag(const string & name);
- bool DeleteFlag(const string & name);
- const string & GetCurrentQuestName() const;
- int GetCurrentQuestIndex();
- void RemoveTimer(const string& name);
- void RemoveTimerNotCancel(const string& name);
- void AddTimer(const string& name, LPEVENT pEvent);
- void ClearTimer();
- void SetCurrentQuestStartFlag();
- void SetCurrentQuestDoneFlag();
- void SetQuestTitle(const string& quest,const string & title);
- void SetCurrentQuestTitle(const string & title);
- void SetCurrentQuestClockName(const string & name);
- void SetCurrentQuestClockValue(int value);
- void SetCurrentQuestCounterName(const string & name);
- void SetCurrentQuestCounterValue(int value);
- void SetCurrentQuestIconFile(const string& icon_file);
- bool IsLoaded() const { return m_bLoaded; }
- void SetLoaded() { m_bLoaded = true; }
- void Build();
- void Save();
- bool HasReward() { return !m_vRewardData.empty() || m_bIsGivenReward; }
- void Reward(LPCHARACTER ch);
- void GiveItem(const string& label, DWORD dwVnum, int count);
- void GiveExp(const string& label, DWORD exp);
- void SetSendDoneFlag() { m_bShouldSendDone = true; }
- bool GetAndResetDoneFlag() { bool temp = m_bShouldSendDone; m_bShouldSendDone = false; return temp; }
- void SendFlagList(LPCHARACTER ch);
- void SetQuestState(const char* szQuestName, const char* szStateName);
- void SetConfirmWait(DWORD dwPID) { m_bConfirmWait = true; m_dwWaitConfirmFromPID = dwPID; }
- void ClearConfirmWait() { m_bConfirmWait = false; }
- bool IsConfirmWait() const { return m_bConfirmWait; }
- bool IsConfirmWait(DWORD dwPID) const { return m_bConfirmWait && dwPID == m_dwWaitConfirmFromPID; }
- void SetSendFlag(int idx);
- void ClearSendFlag() { m_iSendToClient = 0; }
- void SaveFlag(const string & name, int value);
- void ClearCurrentQuestBeginFlag();
- void SetCurrentQuestBeginFlag();
- int GetCurrentQuestBeginFlag();
- void SendQuestInfoPakcet();
- vector<RewardData> m_vRewardData;
- bool m_bIsGivenReward;
- bool m_bShouldSendDone;
- DWORD m_dwID;
- QuestInfo m_QuestInfo;
- QuestState * m_RunningQuestState;
- string m_stCurQuest;
- typedef map<string, int> TFlagMap;
- TFlagMap m_FlagMap;
- TFlagMap m_FlagSaveMap;
- typedef map<string, LPEVENT> TTimerMap;
- TTimerMap m_TimerMap;
- int m_iSendToClient;
- bool m_bLoaded;
- int m_iLastState;
- DWORD m_dwWaitConfirmFromPID;
- bool m_bConfirmWait;
- inline PC::QuestInfoIterator PC::quest_begin()
- inline PC::QuestInfoIterator PC::quest_end()
- inline PC::QuestInfoIterator PC::quest_find(DWORD quest_index)
- inline bool PC::IsRunning()
- inline QuestState* PC::GetRunningQuestState()
- refine.h
- enum
- BLACKSMITH_MOB = 20016,
- ALCHEMIST_MOB = 20001,
- GOLDEN_BLACKSMITH_MOB = 21900,
- BLACKSMITH_WEAPON_MOB = 20044,
- BLACKSMITH_ARMOR_MOB = 20045,
- BLACKSMITH_ACCESSORY_MOB = 20046,
- DEVILTOWER_BLACKSMITH_WEAPON_MOB = 20074,
- DEVILTOWER_BLACKSMITH_ARMOR_MOB = 20075,
- DEVILTOWER_BLACKSMITH_ACCESSORY_MOB = 20076,
- BLACKSMITH2_MOB = 20091,
- class CRefineManager : public singleton<CRefineManager>
- typedef std::map<DWORD, TRefineTable> TRefineRecipeMap;
- public:
- CRefineManager();
- bool Initialize(TRefineTable * table, int size);
- const TRefineTable* GetRefineRecipe(DWORD id);
- TRefineRecipeMap m_map_RefineRecipe;
- regen.h
- enum
- REGEN_TYPE_MOB,
- REGEN_TYPE_GROUP,
- REGEN_TYPE_EXCEPTION,
- REGEN_TYPE_GROUP_GROUP,
- REGEN_TYPE_ANYWHERE,
- REGEN_TYPE_MAX_NUM
- struct regen
- LPREGEN prev, next;
- long lMapIndex;
- int type;
- int sx, sy, ex, ey;
- BYTE z_section;
- BYTE direction;
- DWORD time;
- int max_count;
- int count;
- int vnum;
- bool is_aggressive;
- LPEVENT event;
- size_t id; // to help dungeon regen identification
- regen() :
- EVENTINFO(regen_event_info)
- LPREGEN regen;
- regen_event_info()
- regen_event_info REGEN_EVENT_INFO;
- struct regen_exception
- LPREGEN_EXCEPTION prev, next;
- int sx, sy, ex, ey;
- BYTE z_section;
- class CDungeon;
- EVENTINFO(dungeon_regen_event_info)
- LPREGEN regen;
- CDungeon::IdType dungeon_id;
- dungeon_regen_event_info()
- extern bool regen_load(const char *filename, long lMapIndex, int base_x, int base_y);
- extern bool regen_do(const char* filename, long lMapIndex, int base_x, int base_y, LPDUNGEON pDungeon, bool bOnce = true );
- extern bool regen_load_in_file(const char* filename, long lMapIndex, int base_x, int base_y );
- extern void regen_free();
- extern bool is_regen_exception(long x, long y);
- extern void regen_reset(int x, int y);
- safebox.h
- class CHARACTER;
- class CItem;
- class CGrid;
- class CSafebox
- CSafebox(LPCHARACTER pkChrOwner, int iSize, DWORD dwGold);
- bool Add(DWORD dwPos, LPITEM pkItem);
- LPITEM Get(DWORD dwPos);
- LPITEM Remove(DWORD dwPos);
- void ChangeSize(int iSize);
- bool MoveItem(BYTE bCell, BYTE bDestCell, BYTE count);
- LPITEM GetItem(BYTE bCell);
- void Save();
- bool IsEmpty(DWORD dwPos, BYTE bSize);
- bool IsValidPosition(DWORD dwPos);
- void SetWindowMode(BYTE bWindowMode);
- void __Destroy();
- LPCHARACTER m_pkChrOwner;
- LPITEM m_pkItems[SAFEBOX_MAX_NUM];
- CGrid * m_pkGrid;
- int m_iSize;
- long m_lGold;
- BYTE m_bWindowMode;
- sectree.h
- enum ESectree
- SECTREE_SIZE = 6400,
- SECTREE_HALF_SIZE = 3200,
- CELL_SIZE = 50
- struct sectree_coord
- unsigned x : 16;
- unsigned y : 16;
- union sectreeid
- DWORD package;
- SECTREE_COORD coord;
- enum
- ATTR_BLOCK = (1 << 0),
- ATTR_WATER = (1 << 1),
- ATTR_BANPK = (1 << 2),
- ATTR_OBJECT = (1 << 7),
- struct FCollectEntity {
- template<typename F>
- void ForEach(F& f) {
- typedef std::vector<LPENTITY> ListType;
- ListType result; // list collected
- class CAttribute;
- class SECTREE
- friend class SECTREE_MANAGER;
- friend class SECTREE_MAP;
- template <class _Func> LPENTITY find_if (_Func & func) const
- template <class _Func> void ForEachAround(_Func & func)
- template <class _Func> void for_each_for_find_victim(_Func & func)
- template <class _Func> bool for_each_entity_for_find_victim(_Func & func)
- SECTREE();
- void Initialize();
- void Destroy();
- SECTREEID GetID();
- bool InsertEntity(LPENTITY ent);
- void RemoveEntity(LPENTITY ent);
- void SetRegenEvent(LPEVENT event);
- bool Regen();
- void IncreasePC();
- void DecreasePC();
- void BindAttribute(CAttribute * pkAttribute);
- CAttribute * GetAttributePtr() { return m_pkAttribute; }
- DWORD GetAttribute(long x, long y);
- bool IsAttr(long x, long y, DWORD dwFlag);
- void CloneAttribute(LPSECTREE tree);
- int GetEventAttribute(long x, long y);
- void SetAttribute(DWORD x, DWORD y, DWORD dwAttr);
- void RemoveAttribute(DWORD x, DWORD y, DWORD dwAttr);
- template <class _Func> void for_each_entity(_Func & func)
- SECTREEID m_id;
- ENTITY_SET m_set_entity;
- LPSECTREE_LIST m_neighbor_list;
- int m_iPCCount;
- bool isClone;
- CAttribute * m_pkAttribute;
- sectree_manager.h
- struct SMapRegion
- int index;
- int sx, sy, ex, ey;
- PIXEL_POSITION posSpawn;
- bool bEmpireSpawnDifferent;
- PIXEL_POSITION posEmpire[3];
- std::string strMapName;
- struct TAreaInfo
- int sx, sy, ex, ey, dir;
- TAreaInfo(int sx, int sy, int ex, int ey, int dir)
- struct npc_info
- BYTE bType;
- const char* name;
- long x, y;
- npc_info(BYTE bType, const char* name, long x, long y)
- std::map<std::string, TAreaInfo> TAreaMap;
- struct SSetting
- int iIndex;
- int iCellScale;
- int iBaseX;
- int iBaseY;
- int iWidth;
- int iHeight;
- PIXEL_POSITION posSpawn;
- class SECTREE_MAP
- typedef std::map<DWORD, LPSECTREE> MapType;
- SECTREE_MAP();
- SECTREE_MAP(SECTREE_MAP & r);
- bool Add(DWORD key, LPSECTREE sectree)
- LPSECTREE Find(DWORD dwPackage);
- LPSECTREE Find(DWORD x, DWORD y);
- void Build();
- TMapSetting m_setting;
- template< typename Func >
- void for_each( Func & rfunc )
- void DumpAllToSysErr()
- MapType map_;
- enum EAttrRegionMode
- ATTR_REGION_MODE_SET,
- ATTR_REGION_MODE_REMOVE,
- ATTR_REGION_MODE_CHECK,
- class SECTREE_MANAGER : public singleton<SECTREE_MANAGER>
- SECTREE_MANAGER();
- LPSECTREE_MAP GetMap(long lMapIndex);
- LPSECTREE Get(DWORD dwIndex, DWORD package);
- LPSECTREE Get(DWORD dwIndex, DWORD x, DWORD y);
- template< typename Func >
- void for_each( int iMapIndex, Func & rfunc )
- int LoadSettingFile(long lIndex, const char * c_pszSettingFileName, TMapSetting & r_setting);
- bool LoadMapRegion(const char * c_pszFileName, TMapSetting & r_Setting, const char * c_pszMapName);
- int Build(const char * c_pszListFileName, const char* c_pszBasePath);
- LPSECTREE_MAP BuildSectreeFromSetting(TMapSetting & r_setting);
- bool LoadAttribute(LPSECTREE_MAP pkMapSectree, const char * c_pszFileName, TMapSetting & r_setting);
- void LoadDungeon(int iIndex, const char * c_pszFileName);
- bool GetValidLocation(long lMapIndex, long x, long y, long & r_lValidMapIndex, PIXEL_POSITION & r_pos, BYTE empire = 0);
- bool GetSpawnPosition(long x, long y, PIXEL_POSITION & r_pos);
- bool GetSpawnPositionByMapIndex(long lMapIndex, PIXEL_POSITION & r_pos);
- bool GetRecallPositionByEmpire(int iMapIndex, BYTE bEmpire, PIXEL_POSITION & r_pos);
- const TMapRegion * GetMapRegion(long lMapIndex);
- int GetMapIndex(long x, long y);
- const TMapRegion * FindRegionByPartialName(const char* szMapName);
- bool GetMapBasePosition(long x, long y, PIXEL_POSITION & r_pos);
- bool GetMapBasePositionByMapIndex(long lMapIndex, PIXEL_POSITION & r_pos);
- bool GetMovablePosition(long lMapIndex, long x, long y, PIXEL_POSITION & pos);
- bool IsMovablePosition(long lMapIndex, long x, long y);
- bool GetCenterPositionOfMap(long lMapIndex, PIXEL_POSITION & r_pos);
- bool GetRandomLocation(long lMapIndex, PIXEL_POSITION & r_pos, DWORD dwCurrentX = 0, DWORD dwCurrentY = 0, int iMaxDistance = 0);
- long CreatePrivateMap(long lMapIndex); // returns new private map index, returns 0 when fail
- void DestroyPrivateMap(long lMapIndex);
- TAreaMap& GetDungeonArea(long lMapIndex);
- void SendNPCPosition(LPCHARACTER ch);
- void InsertNPCPosition(long lMapIndex, BYTE bType, const char* szName, long x, long y);
- BYTE GetEmpireFromMapIndex(long lMapIndex);
- void PurgeMonstersInMap(long lMapIndex);
- void PurgeStonesInMap(long lMapIndex);
- void PurgeNPCsInMap(long lMapIndex);
- size_t GetMonsterCountInMap(long lMapIndex);
- size_t GetMonsterCountInMap(long lMpaIndex, DWORD dwVnum);
- bool ForAttrRegion(long lMapIndex, long lStartX, long lStartY, long lEndX, long lEndY, long lRotate, DWORD dwAttr, EAttrRegionMode mode);
- bool SaveAttributeToImage(int lMapIndex, const char * c_pszFileName, LPSECTREE_MAP pMapSrc = NULL);
- bool ForAttrRegionRightAngle( long lMapIndex, long lCX, long lCY, long lCW, long lCH, long lRotate, DWORD dwAttr, EAttrRegionMode mode );
- bool ForAttrRegionFreeAngle( long lMapIndex, long lCX, long lCY, long lCW, long lCH, long lRotate, DWORD dwAttr, EAttrRegionMode mode );
- bool ForAttrRegionCell( long lMapIndex, long lCX, long lCY, DWORD dwAttr, EAttrRegionMode mode );
- static WORD current_sectree_version;
- std::map<DWORD, LPSECTREE_MAP> m_map_pkSectree;
- std::map<int, TAreaMap> m_map_pkArea;
- std::vector<TMapRegion> m_vec_mapRegion;
- std::map<DWORD, std::vector<npc_info> > m_mapNPCPosition;
- typedef TR1_NS::unordered_map<long, int> PrivateIndexMapType;
- PrivateIndexMapType next_private_index_map_;
- sequence.h
- #define SEQUENCE_MAX_NUM 32768
- extern const BYTE gc_abSequence[SEQUENCE_MAX_NUM];
- shop.h
- enum
- SHOP_MAX_DISTANCE = 1000
- class CGrid;
- class CShop
- struct shop_item
- DWORD vnum;
- long price;
- BYTE count;
- LPITEM pkItem;
- int itemid;
- shop_item()
- vnum = 0;
- price = 0;
- count = 0;
- itemid = 0;
- pkItem = NULL;
- CShop();
- bool Create(DWORD dwVnum, DWORD dwNPCVnum, TShopItemTable * pItemTable);
- void SetShopItems(TShopItemTable * pItemTable, BYTE bItemCount);
- virtual void SetPCShop(LPCHARACTER ch);
- virtual bool IsPCShop() { return m_pkPC ? true : false; }
- virtual bool AddGuest(LPCHARACTER ch,DWORD owner_vid, bool bOtherEmpire);
- void RemoveGuest(LPCHARACTER ch);
- virtual int Buy(LPCHARACTER ch, BYTE pos);
- void BroadcastUpdateItem(BYTE pos);
- int GetNumberByVnum(DWORD dwVnum);
- virtual bool IsSellingItem(DWORD itemID);
- DWORD GetVnum() { return m_dwVnum; }
- DWORD GetNPCVnum() { return m_dwNPCVnum; }
- void Broadcast(const void * data, int bytes);
- DWORD m_dwVnum;
- DWORD m_dwNPCVnum;
- CGrid * m_pGrid;
- typedef TR1_NS::unordered_map<LPCHARACTER, bool> GuestMapType;
- GuestMapType m_map_guest;
- std::vector<SHOP_ITEM> m_itemVector;
- LPCHARACTER m_pkPC;
- shop_manager.h
- class CShop;
- class CShop * LPSHOP;
- class CShopManager : public singleton<CShopManager>
- std::map<DWORD, CShop *> TShopMap;
- CShopManager();
- bool Initialize(TShopTable * table, int size);
- void Destroy();
- LPSHOP Get(DWORD dwVnum);
- LPSHOP GetByNPCVnum(DWORD dwVnum);
- bool StartShopping(LPCHARACTER pkChr, LPCHARACTER pkShopKeeper, int iShopVnum = 0);
- void StopShopping(LPCHARACTER ch);
- void Buy(LPCHARACTER ch, BYTE pos);
- void Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount = 0);
- LPSHOP CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, BYTE bItemCount);
- LPSHOP FindPCShop(DWORD dwVID);
- void DestroyPCShop(LPCHARACTER ch);
- TShopMap m_map_pkShop;
- TShopMap m_map_pkShopByNPCVnum;
- TShopMap m_map_pkShopByPC;
- bool ReadShopTableEx(const char* stFileName);
- shopEx.h
- struct SShopTable;
- struct SShopTableEx : SShopTable
- std::string name;
- EShopCoinType coinType;
- class CGroupNode;
- class CShopEx: public CShop
- bool Create(DWORD dwVnum, DWORD dwNPCVnum);
- bool AddShopTable(TShopTableEx& shopTable);
- virtual bool AddGuest(LPCHARACTER ch,DWORD owner_vid, bool bOtherEmpire);
- virtual void SetPCShop(LPCHARACTER ch) { return; }
- virtual bool IsPCShop() { return false; }
- virtual int Buy(LPCHARACTER ch, BYTE pos);
- virtual bool IsSellingItem(DWORD itemID) { return false; }
- size_t GetTabCount() { return m_vec_shopTabs.size(); }
- std::vector <TShopTableEx> m_vec_shopTabs;
- CShopEx* LPSHOPEX;
- skill.h
- #pragma once
- enum ESkillFlags
- SKILL_FLAG_ATTACK = (1 << 0), // °ø°Ý ±â¼ú
- SKILL_FLAG_USE_MELEE_DAMAGE = (1 << 1), // ±âº» ¹Ð¸® Ÿ°ÝÄ¡¸¦ b °ªÀ¸·Î »ç¿ë
- SKILL_FLAG_COMPUTE_ATTGRADE = (1 << 2), // °ø°Ýµî±ÞÀ» °è»êÇÑ´Ù
- SKILL_FLAG_SELFONLY = (1 << 3), // Àڽſ¡°Ô¸¸ ¾µ ¼ö ÀÖÀ½
- SKILL_FLAG_USE_MAGIC_DAMAGE = (1 << 4), // ±âº» ¸¶¹ý Ÿ°ÝÄ¡¸¦ b °ªÀ¸·Î »ç¿ë
- SKILL_FLAG_USE_HP_AS_COST = (1 << 5), // HP¸¦ SP´ë½Å ¾´´Ù
- SKILL_FLAG_COMPUTE_MAGIC_DAMAGE = (1 << 6),
- SKILL_FLAG_SPLASH = (1 << 7),
- SKILL_FLAG_GIVE_PENALTY = (1 << 8), // ¾²°í³ª¸é Àá½Ãµ¿¾È(3ÃÊ) 2¹è µ¥¹ÌÁö¸¦ ¹Þ´Â´Ù.
- SKILL_FLAG_USE_ARROW_DAMAGE = (1 << 9), // ±âº» È»ì Ÿ°ÝÄ¡¸¦ b °ªÀ¸·Î »ç¿ë
- SKILL_FLAG_PENETRATE = (1 << 10), // ¹æ¾î¹«½Ã
- SKILL_FLAG_IGNORE_TARGET_RATING = (1 << 11), // »ó´ë ·¹ÀÌÆà ¹«½Ã
- SKILL_FLAG_SLOW = (1 << 12), // ½½·Î¿ì °ø°Ý
- SKILL_FLAG_STUN = (1 << 13), // ½ºÅÏ °ø°Ý
- SKILL_FLAG_HP_ABSORB = (1 << 14), // HP Èí¼ö
- SKILL_FLAG_SP_ABSORB = (1 << 15), // SP Èí¼ö
- SKILL_FLAG_FIRE_CONT = (1 << 16), // FIRE Áö¼Ó µ¥¹ÌÁö
- SKILL_FLAG_REMOVE_BAD_AFFECT = (1 << 17), // ³ª»ÛÈ¿°ú Á¦°Å
- SKILL_FLAG_REMOVE_GOOD_AFFECT = (1 << 18), // ³ª»ÛÈ¿°ú Á¦°Å
- SKILL_FLAG_CRUSH = (1 << 19), // »ó´ë¹æÀ» ³¯¸²
- SKILL_FLAG_POISON = (1 << 20), // µ¶ °ø°Ý
- SKILL_FLAG_TOGGLE = (1 << 21), // Åä±Û
- SKILL_FLAG_DISABLE_BY_POINT_UP = (1 << 22), // Âï¾î¼ ¿Ã¸± ¼ö ¾ø´Ù.
- SKILL_FLAG_CRUSH_LONG = (1 << 23), // »ó´ë¹æÀ» ¸Ö¸® ³¯¸²
- SKILL_FLAG_WIND = (1 << 24), // ¹Ù¶÷ ¼Ó¼º
- SKILL_FLAG_ELEC = (1 << 25), // Àü±â ¼Ó¼º
- SKILL_FLAG_FIRE = (1 << 26), // ºÒ ¼Ó¼º
- enum
- SKILL_PENALTY_DURATION = 3,
- SKILL_TYPE_HORSE = 5,
- enum ESkillIndexes
- SKILL_RESERVED = 0,
- SKILL_SAMYEON = 1, // »ï¿¬Âü(¼¼¹øº£±â)
- SKILL_PALBANG, // Æȹædz¿ì
- SKILL_JEONGWI, // Àü±ÍÈ¥
- SKILL_GEOMKYUNG, // °Ë°æ
- SKILL_TANHWAN, // źȯ°Ý
- SKILL_GIGONGCHAM = 16, // ±â°øÂü
- SKILL_GYOKSAN, // °Ý»êŸ¿ì
- SKILL_DAEJINGAK, // ´ëÁø°¢
- SKILL_CHUNKEON, // õ±ÙÃß
- SKILL_GEOMPUNG, // °Ëdz
- SKILL_AMSEOP = 31, // ¾Ï½À
- SKILL_GUNGSIN, // ±Ã½Åź¿µ
- SKILL_CHARYUN, // Â÷·û»ì
- SKILL_EUNHYUNG, // ÀºÇü¹ý
- SKILL_SANGONG, // »ê°øºÐ
- SKILL_YEONSA = 46, // ¿¬»ç
- SKILL_KWANKYEOK, // °ü°Ý¼ú
- SKILL_HWAJO, // ÈÁ¶ÆÄ
- SKILL_GYEONGGONG, // °æ°ø¼ú
- SKILL_GIGUNG, // ±â±Ã
- SKILL_SWAERYUNG = 61, // ¼â·ÉÁö
- SKILL_YONGKWON, // ¿ë±ÇÆÄ
- SKILL_GWIGEOM, // ±Í°Ë
- SKILL_TERROR, // °øÆ÷
- SKILL_JUMAGAP, // ÁÖ¸¶°©
- SKILL_PABEOB, // ÆĹý¼ú
- SKILL_MARYUNG = 76, // ¸¶·É
- SKILL_HWAYEOMPOK, // È¿°Æø
- SKILL_MUYEONG, // ¹«¿µÁø
- SKILL_MANASHILED, // Èæ½Å¼öÈ£
- SKILL_TUSOK, // Åõ¼Ó¸¶·É
- SKILL_MAHWAN, // ¸¶È¯°Ý
- SKILL_BIPABU = 91,
- SKILL_YONGBI, // ¿ëºñ±¤»çÆÄ
- SKILL_PAERYONG, // Æз泪Çѹ«
- SKILL_HOSIN, // È£½Å
- SKILL_REFLECT, // º¸È£
- SKILL_GICHEON, // ±âõ´ë°ø
- SKILL_NOEJEON = 106, // ³úÀü·É
- SKILL_BYEURAK, // º¶ô
- SKILL_CHAIN, // üÀζóÀÌÆ®´×
- SKILL_JEONGEOP, // Á¤¾÷ÀÎ
- SKILL_KWAESOK, // À̵¿¼Óµµ¾÷
- SKILL_JEUNGRYEOK, // Áõ·Â¼ú
- SKILL_7_A_ANTI_TANHWAN = 112,
- SKILL_7_B_ANTI_AMSEOP,
- SKILL_7_C_ANTI_SWAERYUNG,
- SKILL_7_D_ANTI_YONGBI,
- SKILL_8_A_ANTI_GIGONGCHAM,
- SKILL_8_B_ANTI_YEONSA,
- SKILL_8_C_ANTI_MAHWAN,
- SKILL_8_D_ANTI_BYEURAK,
- SKILL_LEADERSHIP = 121, // Åë¼Ö·Â
- SKILL_COMBO = 122, // ¿¬°è±â
- SKILL_CREATE = 123, // Á¦Á¶
- SKILL_MINING = 124,
- SKILL_LANGUAGE1 = 126, // ½Å¼ö¾î ´É·Â
- SKILL_LANGUAGE2 = 127, // õÁ¶¾î ´É·Â
- SKILL_LANGUAGE3 = 128, // Áø³ë¾î ´É·Â
- SKILL_POLYMORPH = 129, // µÐ°©
- SKILL_HORSE = 130, // ½Â¸¶ ½ºÅ³
- SKILL_HORSE_SUMMON = 131, // ¸» ¼Òȯ ½ºÅ³
- SKILL_HORSE_WILDATTACK = 137, // ³¹«
- SKILL_HORSE_CHARGE = 138, // µ¹°Ý
- SKILL_HORSE_ESCAPE = 139, // Å»Ãâ
- SKILL_HORSE_WILDATTACK_RANGE = 140, // ³¹«(È°)
- SKILL_ADD_HP = 141, // ÁõÇ÷
- SKILL_RESIST_PENETRATE = 142, // öÅë
- GUILD_SKILL_START = 151,
- GUILD_SKILL_EYE = 151,
- GUILD_SKILL_BLOOD = 152,
- GUILD_SKILL_BLESS = 153,
- GUILD_SKILL_SEONGHWI = 154,
- GUILD_SKILL_ACCEL = 155,
- GUILD_SKILL_BUNNO = 156,
- GUILD_SKILL_JUMUN = 157,
- GUILD_SKILL_TELEPORT = 158,
- GUILD_SKILL_DOOR = 159,
- GUILD_SKILL_END = 162,
- GUILD_SKILL_COUNT = GUILD_SKILL_END - GUILD_SKILL_START + 1,
- class CSkillProto
- char szName[64];
- DWORD dwVnum; // ¹øÈ£
- DWORD dwType; // 0: ÀüÁ÷¾÷, 1: ¹«»ç, 2: ÀÚ°´, 3: ¼ö¶ó, 4: ¹«´ç
- BYTE bMaxLevel; // ÃÖ´ë ¼ö·Ãµµ
- BYTE bLevelLimit; // ·¹º§Á¦ÇÑ
- int iSplashRange; // ½ºÇ÷¡½¬ °Å¸® Á¦ÇÑ
- BYTE bPointOn; // ¾îµð¿¡ °á°ú°ªÀ» Àû¿ë ½ÃÅ°´Â°¡? (Ÿ°ÝÄ¡, MAX HP, HP REGEN µîµîµî)
- CPoly kPointPoly; // °á°ú°ª ¸¸µå´Â °ø½Ä
- CPoly kSPCostPoly; // »ç¿ë SP °ø½Ä
- CPoly kDurationPoly; // Áö¼Ó ½Ã°£ °ø½Ä
- CPoly kDurationSPCostPoly; // Áö¼Ó SP °ø½Ä
- CPoly kCooldownPoly; // Äð´Ù¿î ½Ã°£ °ø½Ä
- CPoly kMasterBonusPoly; // ¸¶½ºÅÍÀÏ ¶§ º¸³Ê½º °ø½Ä
- CPoly kSplashAroundDamageAdjustPoly; // ½ºÇ÷¡½¬ °ø°ÝÀÏ °æ¿ì ÁÖÀ§ Àû¿¡°Ô ÀÔÈ÷´Â µ¥¹ÌÁö °¨¼Ò ºñÀ²
- DWORD dwFlag; // ½ºÅ³¿É¼Ç
- DWORD dwAffectFlag; // ½ºÅ³¿¡ ¸ÂÀº °æ¿ì Àû¿ëµÇ´Â Affect
- BYTE bLevelStep; // Çѹø¿¡ ¿Ã¸®´Âµ¥ ÇÊ¿äÇÑ ½ºÅ³ Æ÷ÀÎÆ® ¼ö
- DWORD preSkillVnum; // ¹è¿ì´Âµ¥ ÇÊ¿äÇÑ ÀÌÀü¿¡ ¹è¿ö¾ßÇÒ ½ºÅ³
- BYTE preSkillLevel; // ÀÌÀü¿¡ ¹è¿ö¾ßÇÒ ½ºÅ³ÀÇ ·¹º§
- long lMaxHit;
- BYTE bSkillAttrType;
- BYTE bPointOn2;
- CPoly kPointPoly2;
- CPoly kDurationPoly2;
- DWORD dwFlag2;
- DWORD dwAffectFlag2;
- DWORD dwTargetRange;
- bool IsChargeSkill()
- BYTE bPointOn3;
- CPoly kPointPoly3;
- CPoly kDurationPoly3;
- CPoly kGrandMasterAddSPCostPoly;
- void SetPointVar(const std::string& strName, double dVar);
- void SetDurationVar(const std::string& strName, double dVar);
- void SetSPCostVar(const std::string& strName, double dVar);
- class CSkillManager : public singleton<CSkillManager>
- CSkillManager();
- bool Initialize(TSkillTable * pTab, int iSize);
- CSkillProto * Get(DWORD dwVnum);
- CSkillProto * Get(const char * c_pszSkillName);
- std::map<DWORD, CSkillProto *> m_map_pkSkillProto;
- skill_power.h
- class CTableBySkill : public singleton<CTableBySkill>
- CTableBySkill()
- bool Check() const;
- void DeleteAll();
- int GetSkillPowerByLevelFromType( int job, int skillgroup, int skilllevel, bool bMob ) const;
- void SetSkillPowerByLevelFromType( int idx, const int* aTable );
- void DeleteSkillPowerByLevelFromType( int idx );
- int GetSkillDamageByLevel( int Level ) const;
- void SetSkillDamageByLevelTable( const int* aTable );
- void DeleteSkillDamageByLevelTable();
- int * m_aiSkillPowerByLevelFromType[JOB_MAX_NUM*2];
- int * m_aiSkillDamageByLevel;
- spam.h
- class SpamManager : public singleton<SpamManager>
- inline const char * GetSpamScore(const char * src, size_t len, unsigned int & score)
- inline void Clear()
- inline void Insert(const char * str, unsigned int score = 10)
- std::vector< std::pair<std::string, unsigned int> > m_vec_word;
- stable_priority_queue.h
- template<class T, class Container = std::list<T>, class Compare = std::less<typename Container::value_type> >
- class stable_priority_queue
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- Container c;
- Compare comp;
- template<class InputIterator>
- void push(InputIterator first, InputIterator end)
- explicit stable_priority_queue( const Compare& cp = Compare(), const Container& cc = Container() )
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- const value_type& top() const { return c.back(); }
- void pop() { c.pop_back(); }
- void push( const value_type& x)
- start_position.h
- extern char g_nation_name[4][32];
- extern DWORD g_start_position[4][2];
- extern long g_start_map[4];
- extern DWORD g_create_position[4][2];
- extern DWORD g_create_position_canada[4][2];
- extern DWORD arena_return_position[4][2];
- inline const char* EMPIRE_NAME( BYTE e)
- inline DWORD EMPIRE_START_MAP(BYTE e)
- inline DWORD EMPIRE_START_X(BYTE e)
- inline DWORD EMPIRE_START_Y(BYTE e)
- inline DWORD ARENA_RETURN_POINT_X(BYTE e)
- inline DWORD ARENA_RETURN_POINT_Y(BYTE e)
- inline DWORD CREATE_START_X(BYTE e)
- inline DWORD CREATE_START_Y(BYTE e)
- state.h
- class CState
- virtual void ExecuteBeginState() = 0;
- virtual void ExecuteState() = 0;
- virtual void ExecuteEndState() = 0;
- template <class T>
- class CStateTemplate : public CState
- typedef void (T::*PFNSTATE) (void);
- T * m_pInstance; // Instance Pointer
- PFNSTATE m_pfnBeginState; // State Function Pointer
- PFNSTATE m_pfnState; // State Function Pointer
- PFNSTATE m_pfnEndState; // State Function Pointer
- CStateTemplate() : m_pInstance(0), m_pfnBeginState(0), m_pfnState(0), m_pfnEndState(0)
- void Set(T *pInstance, PFNSTATE pfnBeginState, PFNSTATE pfnState, PFNSTATE pfnEndState)
- virtual void ExecuteBeginState()
- virtual void ExecuteState()
- virtual void ExecuteEndState()
- stdafx.h
- #define TR1_NS boost
- #define isdigit iswdigit
- #define isspace iswspace
- #define PASSES_PER_SEC(sec) ((sec) * passes_per_sec)
- #define M_PI 3.14159265358979323846 /* pi */
- #define M_PI_2 1.57079632679489661923 /* pi/2 */
- #define IN
- #define OUT
- target.h
- enum ETargetTypes
- TARGET_TYPE_POS = (1 << 0),
- TARGET_TYPE_VID = (1 << 1),
- EVENTINFO(TargetInfo)
- int iID;
- DWORD dwPID;
- DWORD dwQuestIndex;
- char szTargetName[32+1];
- char szTargetDesc[32+1];
- int iType;
- int iArg1;
- int iArg2;
- int iMapIndex;
- int iOldX;
- int iOldY;
- bool bSendToClient;
- TargetInfo()
- class CTargetManager : public singleton<CTargetManager>
- CTargetManager();
- void CreateTarget(DWORD dwPID, DWORD dwQuestIndex, const char * c_pszTargetName, int iType, int iArg1, int iArg2, int iMapIndex, const char * c_pszTargetDesc = NULL, int iSendFlag = 1);
- void DeleteTarget(DWORD dwPID, DWORD dwQuestIndex, const char * c_pszTargetName);
- void Logout(DWORD dwPID);
- TargetInfo * GetTargetInfo(DWORD dwPID, int iType, int iArg1);
- LPEVENT GetTargetEvent(DWORD dwPID, DWORD dwQuestIndex, const char * c_pszTargetName);
- std::map<DWORD, std::list<LPEVENT> > m_map_kListEvent;
- int m_iID;
- target_info.h
- typedef struct STarget {
- STarget() {}//dwDamageValue = 0; }
- DWORD dwVnum;
- DWORD dwMobTpValue;
- DWORD dwMobExpValue;
- char szMobRace[10];
- DWORD dwDamageMinValue;
- DWORD dwDamageMaxValue;
- class CTargetInfo : public singleton<CTargetInfo>
- CTargetInfo();
- void Initialize();
- TTarget GetInfo(LPCHARACTER pkChar, BYTE vnum);
- std::vector<TTarget> vecTargetInfo;
- text_file_loader.h
- typedef std::map<std::string, TTokenVector> TTokenVectorMap;
- class CTextFileLoader
- typedef struct SGroupNode
- std::string strGroupName;
- TTokenVectorMap LocalTokenVectorMap;
- SGroupNode * pParentNode;
- std::vector<SGroupNode*> ChildNodeVector;
- typedef std::vector<TGroupNode *> TGroupNodeVector;
- static void DestroySystem();
- CTextFileLoader();
- bool Load(const char * c_szFileName);
- const char * GetFileName();
- void SetTop();
- DWORD GetChildNodeCount();
- BOOL SetChildNode(const char * c_szKey);
- BOOL SetChildNode(const std::string & c_rstrKeyHead, DWORD dwIndex);
- BOOL SetChildNode(DWORD dwIndex);
- BOOL SetParentNode();
- BOOL GetCurrentNodeName(std::string * pstrName);
- BOOL IsToken(const std::string & c_rstrKey);
- BOOL GetTokenVector(const std::string & c_rstrKey, TTokenVector ** ppTokenVector);
- BOOL GetTokenBoolean(const std::string & c_rstrKey, BOOL * pData);
- BOOL GetTokenByte(const std::string & c_rstrKey, BYTE * pData);
- BOOL GetTokenWord(const std::string & c_rstrKey, WORD * pData);
- BOOL GetTokenInteger(const std::string & c_rstrKey, int * pData);
- BOOL GetTokenDoubleWord(const std::string & c_rstrKey, DWORD * pData);
- BOOL GetTokenFloat(const std::string & c_rstrKey, float * pData);
- BOOL GetTokenVector2(const std::string & c_rstrKey, D3DXVECTOR2 * pVector2);
- BOOL GetTokenVector3(const std::string & c_rstrKey, D3DXVECTOR3 * pVector3);
- BOOL GetTokenVector4(const std::string & c_rstrKey, D3DXVECTOR4 * pVector4);
- BOOL GetTokenPosition(const std::string & c_rstrKey, D3DXVECTOR3 * pVector);
- BOOL GetTokenQuaternion(const std::string & c_rstrKey, D3DXQUATERNION * pQ);
- BOOL GetTokenDirection(const std::string & c_rstrKey, D3DVECTOR * pVector);
- BOOL GetTokenColor(const std::string & c_rstrKey, D3DXCOLOR * pColor);
- BOOL GetTokenColor(const std::string & c_rstrKey, D3DCOLORVALUE * pColor);
- BOOL GetTokenString(const std::string & c_rstrKey, std::string * pString);
- bool LoadGroup(TGroupNode * pGroupNode);
- std::string m_strFileName;
- DWORD m_dwcurLineIndex;
- const void * mc_pData;
- CMemoryTextFileLoader m_fileLoader;
- TGroupNode m_globalNode;
- TGroupNode * m_pcurNode;
- static CDynamicPool<TGroupNode> ms_groupNodePool;
- threeway_war.h
- struct ForkedSungziMapInfo
- int m_iForkedSung;
- int m_iForkedSungziStartPosition[3][2];
- std::string m_stMapName;
- int m_iBossMobVnum;
- struct ForkedPassMapInfo
- int m_iForkedPass[3];
- int m_iForkedPassStartPosition[3][2];
- std::string m_stMapName[3];
- class CThreeWayWar : public singleton<CThreeWayWar>
- CThreeWayWar ();
- void Initialize ();
- bool LoadSetting (const char* szFileName);
- int GetKillScore (BYTE empire) const;
- void SetKillScore (BYTE empire, int count);
- void SetReviveTokenForPlayer (DWORD PlayerID, int count);
- int GetReviveTokenForPlayer (DWORD PlayerID);
- void DecreaseReviveTokenForPlayer (DWORD PlayerID);
- const ForkedPassMapInfo& GetEventPassMapInfo () const;
- const ForkedSungziMapInfo& GetEventSungZiMapInfo () const;
- bool IsThreeWayWarMapIndex (int iMapIndex) const;
- bool IsSungZiMapIndex (int iMapIndex) const;
- void RandomEventMapSet ();
- void RegisterUser (DWORD PlayerID);
- bool IsRegisteredUser (DWORD PlayerID) const;
- void onDead (LPCHARACTER pChar, LPCHARACTER pKiller);
- void SetRegenFlag (int flag) { RegenFlag_ = flag; }
- int GetRegenFlag () const { return RegenFlag_; }
- void RemoveAllMonstersInThreeWay () const;
- int KillScore_[3];
- int RegenFlag_;
- std::set<int> MapIndexSet_;
- std::vector<ForkedPassMapInfo> PassInfoMap_;
- std::vector<ForkedSungziMapInfo> SungZiInfoMap_;
- boost::unordered_map<DWORD, DWORD> RegisterUserMap_;
- boost::unordered_map<DWORD, int> ReviveTokenMap_;
- const char* GetSungziMapPath();
- const char* GetPassMapPath( BYTE bEmpire );
- int GetPassMapIndex( BYTE bEmpire );
- int GetSungziMapIndex();
- int GetSungziStartX( BYTE bEmpire );
- int GetSungziStartY( BYTE bEmpire );
- int GetPassStartX( BYTE bEmpire );
- int GetPassStartY( BYTE bEmpire );
- typedef.h
- class DESC;
- typedef DESC* LPDESC;
- class CLIENT_DESC;
- typedef CLIENT_DESC* LPCLIENT_DESC;
- class DESC_P2P;
- typedef DESC_P2P* LPDESC_P2P;
- class CHARACTER;
- typedef CHARACTER* LPCHARACTER;
- typedef std::vector<LPCHARACTER> CHARACTER_VECTOR;
- typedef std::list<LPCHARACTER> CHARACTER_LIST;
- typedef TR1_NS::unordered_set<LPCHARACTER> CHARACTER_SET;
- class CItem;
- typedef CItem* LPITEM;
- class CObject;
- typedef CObject* LPOBJECT;
- typedef struct regen* LPREGEN;
- typedef struct regen_exception* LPREGEN_EXCEPTION;
- class CEntity;
- typedef CEntity* LPENTITY;
- typedef std::vector<LPENTITY> ENTITY_VECTOR;
- typedef TR1_NS::unordered_set<LPENTITY> ENTITY_SET;
- class SECTREE;
- typedef SECTREE* LPSECTREE;
- typedef std::list<LPSECTREE> LPSECTREE_LIST;
- class SECTREE_MAP;
- typedef SECTREE_MAP* LPSECTREE_MAP;
- class CDungeon;
- typedef CDungeon* LPDUNGEON;
- class CParty;
- typedef CParty* LPPARTY;
- typedef struct pixel_position_s
- INT x, y, z;
- enum EEntityTypes
- ENTITY_CHARACTER,
- ENTITY_ITEM,
- ENTITY_OBJECT,
- uinque_item.h
- enum
- UNIQUE_GROUP_LUCKY_GOLD = 10024,
- UNIQUE_GROUP_AUTOLOOT = 10011,
- UNIQUE_GROUP_RING_OF_EXP = 10000,
- UNIQUE_GROUP_FISH_MIND = 10009,
- UNIQUE_GROUP_LARGE_SAFEBOX = 10021,
- UNIQUE_GROUP_DOUBLE_ITEM = 10002,
- UNIQUE_GROUP_RING_OF_LANGUAGE = 10025,
- UNIQUE_GROUP_SPECIAL_RIDE = 10030,
- UNIQUE_GROUP_DRAGON_HEART = 10053,
- UNIQUE_ITEM_TEARDROP_OF_GODNESS = 70012,
- UNIQUE_ITEM_RING_OF_LANGUAGE = 70006,
- UNIQUE_ITEM_RING_OF_LANGUAGE_SAMPLE = 70047,
- UNIQUE_ITEM_WHITE_FLAG = 70008,
- UNIQUE_ITEM_TREASURE_BOX = 70009,
- UNIQUE_ITEM_CAPE_OF_COURAGE = 70038,
- UNIQUE_ITEM_HALF_STAMINA = 70040,
- UNIQUE_ITEM_HIDE_ALIGNMENT_TITLE = 70048,
- UNIQUE_ITEM_SKIP_ITEM_DROP_PENALTY = 70049,
- UNIQUE_ITEM_FASTER_ALIGNMENT_UP_BY_TIME = 70050,
- UNIQUE_ITEM_FASTER_ALIGNMENT_UP_BY_KILL = 70051,
- UNIQUE_ITEM_NO_BAD_LUCK_EFFECT = 70052,
- UNIQUE_ITEM_LARBOR_MEDAL = 70004,
- UNIQUE_ITEM_DOUBLE_EXP = 70005,
- UNIQUE_ITEM_DOUBLE_ITEM = 70043,
- UNIQUE_ITEM_PARTY_BONUS_EXP = 70003,
- UNIQUE_ITEM_PARTY_BONUS_EXP_MALL = 71012,
- UNIQUE_ITEM_PARTY_BONUS_EXP_GIFT = 76011,
- ITEM_GIVE_STAT_RESET_COUNT_VNUM = 70014,
- ITEM_SKILLFORGET_VNUM = 70037,
- ITEM_SKILLFORGET2_VNUM = 70055,
- UNIQUE_ITEM_FISH_MIND = 71008,
- UNIQUE_ITEM_SAFEBOX_EXPAND = 71009,
- UNIQUE_ITEM_AUTOLOOT_GOLD = 71010,
- UNIQUE_ITEM_EMOTION_MASK = 71011,
- UNIQUE_ITEM_EMOTION_MASK2 = 71033,
- ITEM_NEW_YEAR_GREETING_VNUM = 50023,
- ITEM_WONSO_BEAN_VNUM = 50020,
- ITEM_WONSO_SUGAR_VNUM = 50021,
- ITEM_WONSO_FRUIT_VNUM = 50022,
- ITEM_VALENTINE_ROSE = 50024,
- ITEM_VALENTINE_CHOCOLATE = 50025,
- ITEM_WHITEDAY_CANDY = 50032,
- ITEM_WHITEDAY_ROSE = 50031,
- ITEM_HORSE_FOOD_1 = 50054,
- ITEM_HORSE_FOOD_2 = 50055,
- ITEM_HORSE_FOOD_3 = 50056,
- ITEM_REVIVE_HORSE_1 = 50057,
- ITEM_REVIVE_HORSE_2 = 50058,
- ITEM_REVIVE_HORSE_3 = 50059,
- ITEM_HORSE_SKILL_TRAIN_BOOK = 50060,
- UNIQUE_ITEM_MARRIAGE_PENETRATE_BONUS = 71069,
- UNIQUE_ITEM_MARRIAGE_EXP_BONUS = 71070,
- UNIQUE_ITEM_MARRIAGE_CRITICAL_BONUS = 71071,
- UNIQUE_ITEM_MARRIAGE_TRANSFER_DAMAGE = 71072,
- UNIQUE_ITEM_MARRIAGE_ATTACK_BONUS = 71073,
- UNIQUE_ITEM_MARRIAGE_DEFENSE_BONUS = 71074,
- ITEM_MARRIAGE_RING = 70302,
- ITEM_MINING_SKILL_TRAIN_BOOK = 50600,
- ITEM_PRISM = 71113,
- ITEM_AUTO_HP_RECOVERY_S = 72723,
- ITEM_AUTO_HP_RECOVERY_M = 72724,
- ITEM_AUTO_HP_RECOVERY_L = 72725,
- ITEM_AUTO_HP_RECOVERY_X = 72726,
- ITEM_AUTO_SP_RECOVERY_S = 72727,
- ITEM_AUTO_SP_RECOVERY_M = 72728,
- ITEM_AUTO_SP_RECOVERY_L = 72729,
- ITEM_AUTO_SP_RECOVERY_X = 72730,
- ITEM_RAMADAN_CANDY = 50183,
- ITEM_NOG_POCKET = 50216,
- REWARD_BOX_ITEM_AUTO_SP_RECOVERY_XS = 76004,
- REWARD_BOX_ITEM_AUTO_SP_RECOVERY_S = 76005,
- REWARD_BOX_ITEM_AUTO_HP_RECOVERY_S = 76021,
- REWARD_BOX_ITEM_AUTO_HP_RECOVERY_XS = 76022,
- FUCKING_BRAZIL_ITEM_AUTO_SP_RECOVERY_S = 79013,
- FUCKING_BRAZIL_ITEM_AUTO_HP_RECOVERY_S = 79012,
- REWARD_BOX_UNIQUE_ITEM_CAPE_OF_COURAGE = 76007,
- DRAGON_SOUL_EXTRACTOR_GROUP = 10600,
- DRAGON_HEART_EXTRACTOR_GROUP = 10601,
- DRAGON_HEART_VNUM = 100000,
- utils.h
- #define IS_SET(flag, bit) ((flag) & (bit))
- #define SET_BIT(var, bit) ((var) |= (bit))
- #define REMOVE_BIT(var, bit) ((var) &= ~(bit))
- #define TOGGLE_BIT(var, bit) ((var) = (var) ^ (bit))
- inline float DISTANCE_SQRT(long dx, long dy)
- inline int DISTANCE_APPROX(int dx, int dy)
- inline WORD MAKEWORD(BYTE a, BYTE b)
- extern void set_global_time(time_t t);
- extern time_t get_global_time();
- extern int dice(int number, int size);
- extern size_t str_lower(const char * src, char * dest, size_t dest_size);
- extern void skip_spaces(char **string);
- extern const char * one_argument(const char *argument, char *first_arg, size_t first_size);
- extern const char * two_arguments(const char *argument, char *first_arg, size_t first_size, char *second_arg, size_t second_size);
- extern const char * first_cmd(const char *argument, char *first_arg, size_t first_arg_size, size_t *first_arg_len_result);
- extern int CalculateDuration(int iSpd, int iDur);
- extern float gauss_random(float avg = 0, float sigma = 1);
- extern int parse_time_str(const char* str);
- extern bool WildCaseCmp(const char *w, const char *s);
- vector.h
- typedef struct SVector
- float x;
- float y;
- float z;
- extern void Normalize(VECTOR * pV1, VECTOR * pV2);
- extern float GetDegreeFromPosition(float x, float y);
- extern float GetDegreeFromPositionXY(long sx, long sy, long ex, long ey);
- extern void GetDeltaByDegree(float fDegree, float fDistance, float *x, float *y);
- extern float GetDegreeDelta(float iDegree, float iDegree2);
- vid.h
- class VID
- VID() : m_id(0), m_crc(0)
- VID(DWORD id, DWORD crc)
- VID(const VID &rvid)
- const VID & operator = (const VID & rhs)
- bool operator == (const VID & rhs) const
- bool operator != (const VID & rhs) const
- operator DWORD() const
- void Reset()
- DWORD getID() const
- DWORD m_id;
- DWORD m_crc;
- extern std::size_t hash_value(VID const& v);
- war_map.h
- enum EWarMapTypes
- WAR_MAP_TYPE_NORMAL,
- WAR_MAP_TYPE_FLAG,
- typedef struct SWarMapInfo
- BYTE bType;
- long lMapIndex;
- PIXEL_POSITION posStart[3];
- namespace warmap
- enum
- WAR_FLAG_VNUM_START = 20035,
- WAR_FLAG_VNUM_END = 20037,
- WAR_FLAG_VNUM0 = 20035,
- WAR_FLAG_VNUM1 = 20036,
- WAR_FLAG_VNUM2 = 20037,
- WAR_FLAG_BASE_VNUM = 20038
- inline bool IsWarFlag(DWORD dwVnum)
- inline bool IsWarFlagBase(DWORD dwVnum)
- class CWarMap
- friend class CGuild;
- CWarMap(long lMapIndex, const TGuildWarInfo & r_info, TWarMapInfo * pkWarMapInfo, DWORD dwGuildID1, DWORD dwGuildID2);
- bool GetTeamIndex(DWORD dwGuild, BYTE & bIdx);
- void IncMember(LPCHARACTER ch);
- void DecMember(LPCHARACTER ch);
- CGuild * GetGuild(BYTE bIdx);
- DWORD GetGuildID(BYTE bIdx);
- BYTE GetType();
- long GetMapIndex();
- DWORD GetGuildOpponent(LPCHARACTER ch);
- DWORD GetWinnerGuild();
- void UsePotion(LPCHARACTER ch, LPITEM item);
- void Draw();
- void Timeout();
- void CheckWarEnd();
- bool SetEnded();
- void ExitAll();
- void SetBeginEvent(LPEVENT pkEv);
- void SetTimeoutEvent(LPEVENT pkEv);
- void SetEndEvent(LPEVENT pkEv);
- void SetResetFlagEvent(LPEVENT pkEv);
- void UpdateScore(DWORD g1, int score1, DWORD g2, int score2);
- bool CheckScore();
- int GetRewardGold(BYTE bWinnerIdx);
- bool GetGuildIndex(DWORD dwGuild, int& iIndex);
- void Packet(const void * pv, int size);
- void Notice(const char * psz);
- void SendWarPacket(LPDESC d);
- void SendScorePacket(BYTE bIdx, LPDESC d = NULL);
- void OnKill(LPCHARACTER killer, LPCHARACTER ch);
- void AddFlag(BYTE bIdx, DWORD x=0, DWORD y=0);
- void AddFlagBase(BYTE bIdx, DWORD x=0, DWORD y=0);
- void RemoveFlag(BYTE bIdx);
- bool IsFlagOnBase(BYTE bIdx);
- void ResetFlag();
- void UpdateUserCount();
- TWarMapInfo m_kMapInfo;
- bool m_bEnded;
- LPEVENT m_pkBeginEvent;
- LPEVENT m_pkTimeoutEvent;
- LPEVENT m_pkEndEvent;
- LPEVENT m_pkResetFlagEvent;
- typedef struct STeamData
- DWORD dwID;
- CGuild * pkGuild;
- int iMemberCount;
- int iUsePotionPrice;
- int iScore;
- LPCHARACTER pkChrFlag;
- LPCHARACTER pkChrFlagBase;
- std::set<DWORD> set_pidJoiner;
- void Initialize();
- int GetAccumulatedJoinerCount();
- int GetCurJointerCount();
- void AppendMember(LPCHARACTER ch);
- void RemoveMember(LPCHARACTER ch);
- TeamData m_TeamData[2];
- int m_iObserverCount;
- DWORD m_dwStartTime;
- BYTE m_bTimeout;
- TGuildWarInfo m_WarInfo;
- CHARACTER_SET m_set_pkChr;
- class CWarMapManager : public singleton<CWarMapManager>
- CWarMapManager();
- bool LoadWarMapInfo(const char * c_pszFileName);
- bool IsWarMap(long lMapIndex);
- TWarMapInfo * GetWarMapInfo(long lMapIndex);
- bool GetStartPosition(long lMapIndex, BYTE bIdx, PIXEL_POSITION & pos);
- template <typename Func> Func for_each(Func f);
- long CreateWarMap(const TGuildWarInfo & r_WarInfo, DWORD dwGuildID1, DWORD dwGuildID2);
- void DestroyWarMap(CWarMap* pMap);
- CWarMap * Find(long lMapIndex);
- int CountWarMap() { return m_mapWarMap.size(); }
- void OnShutdown();
- std::map<long, TWarMapInfo *> m_map_kWarMapInfo;
- std::map<long, CWarMap *> m_mapWarMap;
- template <typename Func> Func CWarMapManager::for_each(Func f)
- wedding.h
- namespace marriage
- const DWORD WEDDING_MAP_INDEX = 81;
- typedef CHARACTER_SET charset_t;
- class WeddingMap
- WeddingMap(DWORD dwMapIndex, DWORD dwPID1, DWORD dwPID2);
- DWORD GetMapIndex() { return m_dwMapIndex; }
- void WarpAll();
- void DestroyAll();
- void Notice(const char* psz);
- void SetEnded();
- void IncMember(LPCHARACTER ch);
- void DecMember(LPCHARACTER ch);
- bool IsMember(LPCHARACTER ch );
- void SetDark(bool bSet);
- void SetSnow(bool bSet);
- void SetMusic(bool bSet, const char* szMusicFileName);
- bool IsPlayingMusic();
- void SendLocalEvent(LPCHARACTER ch);
- void ShoutInMap(BYTE type, const char* szMsg);
- const char* __BuildCommandPlayMusic(char* szCommand, size_t nCmdLen, BYTE bSet, const char* c_szMusicFileName);
- DWORD m_dwMapIndex;
- LPEVENT m_pEndEvent;
- charset_t m_set_pkChr;
- bool m_isDark;
- bool m_isSnow;
- bool m_isMusic;
- DWORD dwPID1;
- DWORD dwPID2;
- std::string m_stMusicFileName;
- class WeddingManager : public singleton<WeddingManager>
- WeddingManager();
- bool IsWeddingMap(DWORD dwMapIndex);
- void Request(DWORD dwPID1, DWORD dwPID2);
- bool End(DWORD dwMapIndex);
- void DestroyWeddingMap(WeddingMap* pMap);
- WeddingMap* Find(DWORD dwMapIndex);
- DWORD __CreateWeddingMap(DWORD dwPID1, DWORD dwPID2);
- std::map<DWORD, WeddingMap*> m_mapWedding;
- xmas_event.h
- namespace xmas
- enum
- MOB_SANTA_VNUM = 20031,
- MOB_XMAS_TREE_VNUM = 20032,
- MOB_XMAS_FIRWORK_SELLER_VNUM = 9004,
- void ProcessEventFlag(const std::string& name, int prev_value, int value);
- void SpawnSanta(long lMapIndex, int iTimeGapSec);
- void SpawnEventHelper(bool spawn);