feat: add resurrection
This commit is contained in:
16
L2BotCore/Domain/Enums/RestartPointTypeEnum.h
Normal file
16
L2BotCore/Domain/Enums/RestartPointTypeEnum.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace L2Bot::Domain::Enums
|
||||
{
|
||||
enum class RestartPointTypeEnum : uint8_t
|
||||
{
|
||||
village = 0,
|
||||
clanhall,
|
||||
castle,
|
||||
siege,
|
||||
festival,
|
||||
jail = 27
|
||||
};
|
||||
}
|
@@ -19,7 +19,8 @@ namespace L2Bot::Domain::Serializers
|
||||
useItem,
|
||||
toggleSoulshot,
|
||||
sit,
|
||||
stand
|
||||
stand,
|
||||
restartPoint
|
||||
};
|
||||
|
||||
const Type GetType() const
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include <vector>
|
||||
#include "../DTO/EntityState.h"
|
||||
#include "../ValueObjects/Vector3.h"
|
||||
#include "../Enums/RestartPointTypeEnum.h"
|
||||
|
||||
namespace L2Bot::Domain::Services
|
||||
{
|
||||
@@ -18,5 +19,6 @@ namespace L2Bot::Domain::Services
|
||||
virtual void ToggleAutouseSoulshot(int objectId) const = 0;
|
||||
virtual void Sit() const = 0;
|
||||
virtual void Stand() const = 0;
|
||||
virtual void RestartPoint(Enums::RestartPointTypeEnum type) const = 0;
|
||||
};
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#include <string>
|
||||
#include "../Serializers/IncomingMessageFactoryInterface.h"
|
||||
#include "HeroServiceInterface.h"
|
||||
#include "../Enums/RestartPointTypeEnum.h"
|
||||
|
||||
namespace L2Bot::Domain::Services
|
||||
{
|
||||
@@ -51,6 +52,9 @@ namespace L2Bot::Domain::Services
|
||||
case Serializers::IncomingMessage::Type::stand:
|
||||
m_HeroService.Stand();
|
||||
break;
|
||||
case Serializers::IncomingMessage::Type::restartPoint:
|
||||
m_HeroService.RestartPoint(message.GetRawContent<Enums::RestartPointTypeEnum>());
|
||||
break;
|
||||
}
|
||||
|
||||
return message.GetType();
|
||||
|
Reference in New Issue
Block a user