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