1
This commit is contained in:
parent
c4479f4473
commit
d9c10334d5
@ -240,6 +240,8 @@ class Creature : public MoveableEntity
|
||||
std::string DebugOutBuffList();
|
||||
bool CanFollow(Creature* follower);
|
||||
void FollowToTarget();
|
||||
int GetFollowTimes() { return follow_times_; };
|
||||
void IncFollowTimes() { ++follow_times_; };
|
||||
|
||||
protected:
|
||||
virtual void OnBuffRemove(Buff& buff);
|
||||
@ -300,6 +302,7 @@ private:
|
||||
std::list<std::tuple<int, Hero*>> slave_heros_;
|
||||
std::list<std::tuple<int, RoomObstacle*>> slave_things_;
|
||||
xtimer_list* auto_switch_weapon_timer_ = nullptr;
|
||||
int follow_times_ = 0;
|
||||
|
||||
a8::Vec2 skill_dir_;
|
||||
float skill_param1 = 0;
|
||||
|
@ -81,6 +81,7 @@ class Human : public Creature
|
||||
std::string session_id;
|
||||
std::string from_appid;
|
||||
std::string team_uuid;
|
||||
int init_team_member_num = 1;
|
||||
bool auto_fill = false;
|
||||
int today_enter_times = 0;
|
||||
int account_registertime = 0;
|
||||
|
@ -368,11 +368,8 @@ public:
|
||||
METAMGR_READ(incubator_canset_distance, 520);
|
||||
|
||||
METAMGR_READ(prebattle_can_use_skill, 1);
|
||||
#ifdef DEBUG
|
||||
METAMGR_READ(watchable, 1);
|
||||
#else
|
||||
METAMGR_READ(watchable, 0);
|
||||
#endif
|
||||
METAMGR_READ(prebattle_combine_team, 1);
|
||||
|
||||
METAMGR_READ(refresh_view_time, 4);
|
||||
{
|
||||
|
@ -179,6 +179,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
|
||||
int prebattle_can_use_skill = 0;
|
||||
int watchable = 0;
|
||||
int prebattle_combine_team = 1;
|
||||
|
||||
private:
|
||||
MetaDataLoader* loader_ = nullptr;
|
||||
|
@ -1303,6 +1303,7 @@ void Player::UpdateFollow()
|
||||
}
|
||||
}
|
||||
}
|
||||
IncFollowTimes();
|
||||
follow = -1;
|
||||
}
|
||||
|
||||
|
@ -579,9 +579,6 @@ std::string RoomMgr::GenTeamHashData(const std::string& team_uuid, std::map<std:
|
||||
|
||||
void RoomMgr::OnJoinRoomOk(const cs::CMJoin& msg, Player* hum)
|
||||
{
|
||||
if (msg.team_members().size() <= 1) {
|
||||
return;
|
||||
}
|
||||
std::map<std::string, long long>* team_hash = nullptr;
|
||||
{
|
||||
auto itr = team_room_hash_.find(msg.team_uuid());
|
||||
@ -608,6 +605,7 @@ void RoomMgr::OnJoinRoomOk(const cs::CMJoin& msg, Player* hum)
|
||||
if (!team_hash) {
|
||||
abort();
|
||||
}
|
||||
hum->init_team_member_num = team_hash->size();
|
||||
{
|
||||
auto itr = team_hash->find(hum->account_id);
|
||||
if (itr != team_hash->end()) {
|
||||
|
@ -48,6 +48,9 @@ void Team::AddMember(Human* member)
|
||||
member->team_id = team_id_;
|
||||
member->SetTeam(this);
|
||||
members_.insert(member);
|
||||
if (member->GetFollowTimes() <= 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool Team::IsFull()
|
||||
|
@ -20,8 +20,10 @@ class Team
|
||||
void CombineBornPoint();
|
||||
void CombineTeam(Team* b_team);
|
||||
Human* GetMemberByUniId(int member_id);
|
||||
int GetInitTeamMemberNum() { return init_team_member_num_; };
|
||||
|
||||
private:
|
||||
int team_id_ = 0;
|
||||
int init_team_member_num_ = 0;
|
||||
std::set<Human*> members_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user