1
This commit is contained in:
parent
6341bc0fa0
commit
f0a1fd39d7
@ -36,13 +36,7 @@ void Guide::UpdateStep()
|
||||
curr_step_meta_->target()
|
||||
});
|
||||
#endif
|
||||
owner_->room->frame_event.AddPropChg
|
||||
(
|
||||
owner_->GetWeakPtrRef(),
|
||||
kPropGuideStep,
|
||||
curr_step_meta_->id(),
|
||||
0,
|
||||
true);
|
||||
SyncStep();
|
||||
switch (curr_step_meta_->target()) {
|
||||
case mt::MOVE_TARGET_GUIDE_STEP:
|
||||
{
|
||||
@ -367,6 +361,16 @@ void Guide::NextStep()
|
||||
++curr_step_idx_;
|
||||
if (curr_step_idx_ >= mt::GuideStep::_steps.size()) {
|
||||
finished_ = true;
|
||||
SyncStep();
|
||||
owner_->SendNewBieEnd();
|
||||
return;
|
||||
}
|
||||
UpdateStep();
|
||||
}
|
||||
|
||||
void Guide::SyncStep()
|
||||
{
|
||||
if (IsFinished()) {
|
||||
owner_->room->frame_event.AddPropChg
|
||||
(
|
||||
owner_->GetWeakPtrRef(),
|
||||
@ -374,7 +378,13 @@ void Guide::NextStep()
|
||||
-1,
|
||||
0,
|
||||
true);
|
||||
return;
|
||||
} else {
|
||||
owner_->room->frame_event.AddPropChg
|
||||
(
|
||||
owner_->GetWeakPtrRef(),
|
||||
kPropGuideStep,
|
||||
curr_step_meta_->id(),
|
||||
0,
|
||||
true);
|
||||
}
|
||||
UpdateStep();
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ class Guide
|
||||
public:
|
||||
|
||||
void Init(Human* owner);
|
||||
void SyncStep();
|
||||
bool IsFinished() { return finished_; };
|
||||
|
||||
private:
|
||||
|
||||
@ -23,7 +25,6 @@ class Guide
|
||||
void ProcUseSkill();
|
||||
|
||||
void NextStep();
|
||||
bool IsFinished() { return finished_; };
|
||||
|
||||
private:
|
||||
Human* owner_ = nullptr;
|
||||
|
@ -255,6 +255,7 @@ class Human : public Creature
|
||||
void CalcStats();
|
||||
void ShiledBreak();
|
||||
std::shared_ptr<Guide> GetGuide() { return guide_; };
|
||||
void SendNewBieEnd();
|
||||
|
||||
protected:
|
||||
void ProcLootWeapon(AddItemDTO& dto);
|
||||
|
@ -1064,6 +1064,14 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SendNewBieEnd()
|
||||
{
|
||||
if (room->IsNewBieRoom()) {
|
||||
cs::SMNewBieEnd notify_msg;
|
||||
SendNotifyMsg(notify_msg);
|
||||
}
|
||||
}
|
||||
|
||||
void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
||||
{
|
||||
#ifdef DEBUG1
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "ability.h"
|
||||
#include "buff.h"
|
||||
#include "stats.h"
|
||||
#include "guide.h"
|
||||
|
||||
#include "mt/Param.h"
|
||||
#include "mt/Equip.h"
|
||||
@ -784,6 +785,14 @@ void Player::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg)
|
||||
},
|
||||
&xtimer_attacher);
|
||||
}
|
||||
{
|
||||
if (room->IsNewBieRoom()) {
|
||||
GetGuide()->SyncStep();
|
||||
if (GetGuide()->IsFinished()) {
|
||||
SendNewBieEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!room->game_over_timer.expired()) {
|
||||
room->xtimer.Delete(room->game_over_timer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user