Files
Sun1602/Server/GameServer/World/ChaosZoneSystem/ChaosZoneBattleTeam.h
T
git 9cb257e7ae Add GameClients drops and keep current 1602 source work.
CN1602 is the local client. KR is the official tree with unpacked Data, System, and Sound. Packed .wpk files stay off git.
2026-08-30 23:24:31 +03:00

73 lines
2.4 KiB
C++

#pragma once
//_NA_007065_20140217_BATTLEGROUND_REFACTORYING
typedef STLX_VECTOR<Player*> PLAYER_SORT_VECTOR;
class ChaosZoneBattleTeam
{
protected:
enum ChaosZoneTeamState {
eCHAOSTEAM_STATE_NONE = 0,
eCHAOSTEAM_STATE_MATCHED,
eCHAOSTEAM_STATE_END,
eCHAOSTEAM_MAX
};
public:
ChaosZoneBattleTeam() :
team_key_(kChaosZoneTeamNone),
team_state_(eCHAOSTEAM_STATE_NONE),
is_win_(false)
{}
virtual ~ChaosZoneBattleTeam() {}
virtual void Update()=0;
virtual void Start()=0;
//Team Member Control
virtual void AddMember(Player* const player)=0;
void RemoveMember(const DWORD char_guid);
Player* FindMember(const DWORD char_guid);
//Agent?? MatchingSystem???? ???? ?????? ?????? ReadyPlayer?? ?????????.
//GameServer???? ?????? ?????? Zone?? ?????? ??? ?????????? ?? ????? ?????.
//About ReadyPlayer
void SetReadyPlayer(Player* const player);
void SetReadyPlayer(const BYTE player_count, DWORD* user_key_list);
#ifdef _NA_008679_20160202_REWORK_BATTLEGROUND
VOID SetReadyPlayer(MSG_AG_BATTLE_GROUND_ENTER_TEAM_CMD* cmd_msg);
#endif //_NA_008679_20160202_REWORK_BATTLEGROUND
bool IsReadyPlayer(const DWORD user_key);
bool IsAllPlayerEntered();
virtual RC::eSTATUS_RESULT OnMoveToSafezone(Player* const player)=0;
virtual void OnResult(const eBATTLEGROUND_RESULT result_type)=0;
//packet send
void SendPacketToAll(MSG_BASE_FORWARD* msg, WORD msg_size);
//inline function
inline BYTE GetMemberCount() const { return player_hash_map_.size(); }
inline void SetTeamKey(ChaosZoneTeam team_key) { team_key_ = team_key; }
inline ChaosZoneTeam GetTeamKey() const { return team_key_; }
inline bool IsExpired() const { return team_state_ == eCHAOSTEAM_STATE_END; }
// _NA_008012_20150130_RANKING_SYSTEM: GoldRush.cpp BattleGroundLeaveRoom
inline bool GetIsWin() { return is_win_; }
protected:
inline void _SetWinFlag(bool is_win) { is_win_ = is_win; }
ChaosZoneTeam team_key_; // ?? ?
ChaosZoneTeamState team_state_; //???? ????
PLAYER_HASH player_hash_map_; // ?? ???
BYTE ready_player_count_; // ????????? ??????? ??
#ifdef _NA_008679_20160202_REWORK_BATTLEGROUND
STLX_MAP<DWORD, BYTE> ready_user_keys_; // ???? ??? ????????? ????? <?????, team_index>
#else
STLX_SET<DWORD> ready_user_keys_; // ???? ??? ????????? ?????
#endif //_NA_008679_20160202_REWORK_BATTLEGROUND
bool is_win_;
};