add wxvoip

This commit is contained in:
aozhiwei 2019-05-21 12:36:24 +08:00
parent 644d90faa7
commit ce9408f6f9
4 changed files with 27 additions and 0 deletions

View File

@ -1641,6 +1641,13 @@ void Human::SendUIUpdate()
SendNotifyMsg(notifymsg);
}
void Human::SendWxVoip()
{
cs::SMWxVoip notifymsg;
notifymsg.set_group_id(a8::XValue(room->room_uuid).GetString());
SendNotifyMsg(notifymsg);
}
void Human::ClearFrameData()
{
if (!new_objects.empty()) {

View File

@ -173,6 +173,7 @@ class Human : public Entity
void SendRollMsg(const std::string& roll_msg);
void UpdateAction();
void SendUIUpdate();
void SendWxVoip();
private:
void ClearFrameData();

View File

@ -830,6 +830,7 @@ void Room::UpdateGas()
battle_start_frameno_ = frame_no;
xtimer.DeleteTimer(auto_jump_timer_);
auto_jump_timer_ = nullptr;
NotifyWxVoip();
}
}
break;
@ -1191,3 +1192,20 @@ void Room::NotifyUiUpdate()
},
&xtimer_attacher.timer_list_);
}
void Room::NotifyWxVoip()
{
xtimer.AddDeadLineTimerAndAttach(0,
a8::XParams()
.SetSender(this),
[] (const a8::XParams& param)
{
Room* room = (Room*)param.sender.GetUserData();
room->TouchPlayerList(a8::XParams(),
[] (Player * hum, a8::XParams & param)
{
hum->SendWxVoip();
});
},
&xtimer_attacher.timer_list_);
}

View File

@ -111,6 +111,7 @@ private:
void OnGameOver();
void RandRemoveAndroid();
void NotifyUiUpdate();
void NotifyWxVoip();
private:
timer_list* stats_timer_ = nullptr;