2018-01-28 13:49:51 +01:00
|
|
|
#include "InstanceContent.h"
|
2018-01-29 13:05:33 +11:00
|
|
|
|
2018-02-04 23:35:16 +01:00
|
|
|
#include <common/Logging/Logger.h>
|
|
|
|
#include <common/Util/Util.h>
|
|
|
|
#include <common/Util/UtilMath.h>
|
|
|
|
|
|
|
|
#include "Actor/Player.h"
|
|
|
|
|
|
|
|
extern Core::Logger g_log;
|
|
|
|
|
2018-01-29 19:40:27 +11:00
|
|
|
Core::InstanceContent::InstanceContent( boost::shared_ptr< Core::Data::InstanceContent > pInstanceContent,
|
|
|
|
uint32_t guId,
|
|
|
|
const std::string& internalName,
|
2018-01-29 19:41:41 +01:00
|
|
|
const std::string& contentName,
|
|
|
|
uint32_t instanceContentId )
|
|
|
|
: Zone( pInstanceContent->territoryType, guId, internalName, contentName ),
|
|
|
|
m_instanceContentInfo( pInstanceContent ),
|
|
|
|
m_instanceContentId( instanceContentId ),
|
|
|
|
m_state( Created )
|
2018-01-29 13:05:33 +11:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Core::InstanceContent::~InstanceContent()
|
|
|
|
{
|
|
|
|
|
2018-01-29 19:41:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t Core::InstanceContent::getInstanceContentId() const
|
|
|
|
{
|
|
|
|
return m_instanceContentId;
|
|
|
|
}
|
|
|
|
|
2018-02-04 23:35:16 +01:00
|
|
|
Core::Data::ExdDataGenerated::InstanceContentPtr Core::InstanceContent::getInstanceContentInfo() const
|
2018-01-29 19:41:41 +01:00
|
|
|
{
|
|
|
|
return m_instanceContentInfo;
|
|
|
|
}
|
2018-02-04 23:35:16 +01:00
|
|
|
|
|
|
|
void Core::InstanceContent::onEnterTerritory( Entity::PlayerPtr pPlayer )
|
|
|
|
{
|
|
|
|
g_log.debug( "InstanceContent::onEnterTerritory: Zone#" + std::to_string( getGuId() ) + "|"
|
|
|
|
+ std::to_string( getInstanceContentId() ) +
|
|
|
|
+ ", Entity#" + std::to_string( pPlayer->getId() ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Core::InstanceContent::onLeaveTerritory( Entity::PlayerPtr pPlayer )
|
|
|
|
{
|
|
|
|
g_log.debug( "InstanceContent::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|"
|
|
|
|
+ std::to_string( getInstanceContentId() ) +
|
|
|
|
+ ", Entity#" + std::to_string( pPlayer->getId() ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Core::InstanceContent::onUpdate( uint32_t currTime )
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|