1
This commit is contained in:
parent
496e9a11eb
commit
a87c3cf085
@ -121,7 +121,7 @@ namespace MetaData
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(i->airdrop_mon(), strings, '|');
|
a8::Split(i->monster_list(), strings, '|');
|
||||||
for (const std::string& tmp_str : strings) {
|
for (const std::string& tmp_str : strings) {
|
||||||
airdrop_mon_list.push_back(a8::XValue(tmp_str));
|
airdrop_mon_list.push_back(a8::XValue(tmp_str));
|
||||||
}
|
}
|
||||||
|
@ -1138,6 +1138,11 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
|||||||
int item_id = a8::XValue(cmds[1]);
|
int item_id = a8::XValue(cmds[1]);
|
||||||
int item_num = a8::XValue(cmds[2]);
|
int item_num = a8::XValue(cmds[2]);
|
||||||
GMAddItem(item_id, item_num);
|
GMAddItem(item_id, item_num);
|
||||||
|
} else if (cmd == "shuaguai" && cmds.size() >= 3) {
|
||||||
|
int hero_id = a8::XValue(cmds[1]);
|
||||||
|
int hero_num = a8::XValue(cmds[2]);
|
||||||
|
std::vector<int> mons = std::vector<int>{hero_id};
|
||||||
|
room->ShuaMon(GetPos(), mons, 100);
|
||||||
} else if (cmd == "addbuff" && cmds.size() >= 2) {
|
} else if (cmd == "addbuff" && cmds.size() >= 2) {
|
||||||
int buff_id = a8::XValue(cmds[1]);
|
int buff_id = a8::XValue(cmds[1]);
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||||
|
@ -1746,9 +1746,11 @@ void Room::AirDrop(int appear_time, int box_id, int airdrop_id)
|
|||||||
},
|
},
|
||||||
&xtimer_attacher_.timer_list_);
|
&xtimer_attacher_.timer_list_);
|
||||||
++airdrop_times_;
|
++airdrop_times_;
|
||||||
|
#if 1
|
||||||
ShuaMon(box_pos,
|
ShuaMon(box_pos,
|
||||||
thing_meta->airdrop_mon_list,
|
thing_meta->airdrop_mon_list,
|
||||||
std::max(thing_meta->i->width(), thing_meta->i->height()));
|
std::max(thing_meta->i->width(), thing_meta->i->height()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3828,6 +3830,15 @@ void Room::ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list, f
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
last_hero_idx = i;
|
last_hero_idx = i;
|
||||||
|
#ifdef DEBUG
|
||||||
|
BroadcastDebugMsg(a8::Format("ShuaMon pos:%d,%d hero_id:%d",
|
||||||
|
{
|
||||||
|
hero_pos.x,
|
||||||
|
hero_pos.y,
|
||||||
|
hero->meta->i->id()
|
||||||
|
}));
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}//end for i
|
}//end for i
|
||||||
}//end if
|
}//end if
|
||||||
|
@ -176,6 +176,7 @@ public:
|
|||||||
RoomObstacle* CreateObstacle(int id, float x, float y);
|
RoomObstacle* CreateObstacle(int id, float x, float y);
|
||||||
int AllocUniid();
|
int AllocUniid();
|
||||||
Incubator* GetIncubator() { return incubator_;};
|
Incubator* GetIncubator() { return incubator_;};
|
||||||
|
void ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list, float radius);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShuaAndroid();
|
void ShuaAndroid();
|
||||||
@ -255,7 +256,6 @@ private:
|
|||||||
size_t GetRoomMaxPlayerNum();
|
size_t GetRoomMaxPlayerNum();
|
||||||
void InitAndroidAI();
|
void InitAndroidAI();
|
||||||
void ForwardGasRing(int n);
|
void ForwardGasRing(int n);
|
||||||
void ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list, float radius);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void InitDebugInfo();
|
void InitDebugInfo();
|
||||||
|
@ -60,7 +60,7 @@ message MapThing
|
|||||||
optional int32 explosion_interval = 18;
|
optional int32 explosion_interval = 18;
|
||||||
optional int32 explosion_times = 19;
|
optional int32 explosion_times = 19;
|
||||||
optional int32 explosion_float = 20;
|
optional int32 explosion_float = 20;
|
||||||
optional string airdrop_mon = 21;
|
optional string monster_list = 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SafeArea
|
message SafeArea
|
||||||
|
Loading…
x
Reference in New Issue
Block a user