1
This commit is contained in:
parent
68732083e0
commit
c28a28c7fd
@ -1160,6 +1160,14 @@ int BattleDataContext::GetHeroLevel()
|
||||
return std::max(hero_lv_, 1);
|
||||
}
|
||||
|
||||
int BattleDataContext::GetHeroId()
|
||||
{
|
||||
if (hero_ability_) {
|
||||
return hero_ability_->hero_meta->id();
|
||||
}
|
||||
A8_ABORT();
|
||||
}
|
||||
|
||||
bool BattleDataContext::IsMainSkill(Skill* skill)
|
||||
{
|
||||
if (skill->meta->_base_skill_meta) {
|
||||
|
@ -81,6 +81,7 @@ struct BattleDataContext
|
||||
|
||||
int GetSkinId();
|
||||
int GetLevel();
|
||||
int GetHeroId();
|
||||
int GetHeroLevel();
|
||||
bool IsMainSkill(Skill* skill);
|
||||
int GetCurrentGetStar();
|
||||
|
@ -2428,6 +2428,7 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
join_msg.set_avatar_url(m->GetAvatarUrl());
|
||||
join_msg.set_head_frame(m->GetHeadFrame());
|
||||
join_msg.set_sex(m->GetSex());
|
||||
join_msg.set_hero_id(m->GetNetData()->GetHeroId());
|
||||
#endif
|
||||
PlayerMgr::Instance()->
|
||||
CreatePlayerByCMJoin(hum,
|
||||
|
@ -124,7 +124,6 @@ void Room::Init()
|
||||
f8::BtMgr::Instance()->BtLoad(room_agent_, "npc/room");
|
||||
f8::BtMgr::Instance()->BtSetCurrent(room_agent_, "npc/room");
|
||||
|
||||
CreateSpawnPoints();
|
||||
CreateWorldObjects();
|
||||
ShuaAndroid();
|
||||
incubator_ = std::make_shared<Incubator>();
|
||||
@ -2262,24 +2261,6 @@ std::shared_ptr<BornPoint> Room::GetBornPoint(int point_uniid)
|
||||
return itr != born_point_hash_.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
void Room::CreateSpawnPoints()
|
||||
{
|
||||
#if 0
|
||||
if (born_point_hash_.empty()) {
|
||||
for (size_t i = 0; i < 10; ++i) {
|
||||
int uniid = AllocUniid();
|
||||
std::shared_ptr<BornPoint> born_point = std::make_shared<BornPoint>();
|
||||
born_point_hash_[uniid] = born_point;
|
||||
if (IsPveRoom()) {
|
||||
std::shared_ptr<mt::WorldObject> wo_meta = std::make_shared<mt::WorldObject>();
|
||||
wo_meta->pos = pve_instance->_spawn_point;
|
||||
born_point->wo_meta = wo_meta;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Room::IncBornPointHumanNum(std::shared_ptr<BornPoint> point, Human* hum)
|
||||
{
|
||||
switch (hum->GetEntitySubType()) {
|
||||
|
@ -308,7 +308,6 @@ private:
|
||||
void RandRemoveAndroid();
|
||||
std::shared_ptr<BornPoint> AllocBornPoint(Human* hum);
|
||||
std::shared_ptr<BornPoint> GetBornPoint(int point_uniid);
|
||||
void CreateSpawnPoints();
|
||||
void CreateWorldObjects();
|
||||
void IncBornPointHumanNum(std::shared_ptr<BornPoint> point, Human* hum);
|
||||
void DecBornPointHumanNum(std::shared_ptr<BornPoint> point, Human* hum);
|
||||
|
Loading…
x
Reference in New Issue
Block a user