talent & skin attr

This commit is contained in:
yangduo 2025-04-18 18:40:25 +08:00
parent ad47190220
commit 1ad105df3c
4 changed files with 22 additions and 0 deletions

View File

@ -2090,6 +2090,16 @@ bool Human::IsEnemy(Human* hum)
}
}
void Human::RecalTalentAttr()
{
}
void Human::RecalSkinAttr()
{
}
void Human::_InternalUpdateMove(float speed)
{
float nx = move_dir.x * speed;

View File

@ -152,6 +152,8 @@ class Human : public MoveableEntity
int kill_times = 0;
int rank = 0;
int maxtalent = 0;
std::function<void(Human*)> on_grid_chg;
Human();
@ -295,6 +297,9 @@ class Human : public MoveableEntity
void DeadDrop();
bool IsEnemy(Human* hum);
void RecalTalentAttr();
void RecalSkinAttr();
protected:
void _InternalUpdateMove(float speed);
void ProcLootSkin(Loot* entity, MetaData::Equip* item_meta);
@ -398,6 +403,8 @@ private:
std::array<float, kHAT_End> buff_attr_abs_ = {};
std::array<float, kHAT_End> buff_attr_rate_ = {};
std::array<float, kHAT_End> talent_attr_abs_ = {};
std::array<float, kHAT_End> skin_attr_abs_ = {};
std::array<ObjectSyncFlags, FIXED_OBJECT_MAXID> fixed_object_sync_flags_ = {};

View File

@ -116,6 +116,10 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
#else
hum->SetSkinInfo(msg.baseskin());
#endif
hum->maxtalent = msg.talent();
hum->RecalTalentAttr();
hum->RecalSkinAttr();
socket_hash_[socket] = hum;
return hum;
}

View File

@ -739,6 +739,7 @@ message CMJoin
optional bool force_entry_newbie_room = 50; //
repeated MFTeamMember team_members = 51; //
optional int32 room_mode = 52; //0: 1:
optional int32 talent = 53; //max id
}
//线