local this = class("playerUnitData")

function this:ctor()
  self.csPlayer = C_EntityManager.CreatePlayer()
  self.unbelievableTime = nil
end

function this:dispatchEventL2C(type, args)
  self.csPlayer:DispatchEventL2C(type, args)
end

function this:addEventC2LHandler(callback)
  self.csPlayer.handler.c2lEventHandler:Add(callback)
end

function this:removeEventC2LHandler(callback)
  self.csPlayer.handler.c2lEventHandler:Remove(callback)
end

function this:setMainControl(entity)
  local csEntity = entity:getCsEntity()
  self.csPlayer:SetControllingEntity(csEntity)
end

function this:addHero(entity)
  local csEntity = entity:getCsEntity()
  self.csPlayer:AddChild(csEntity)
end

function this:addControllable(entity)
  local csEntity = entity:getCsEntity()
  self.csPlayer:AddControllable(csEntity)
end

function this:addMount(petEntity)
  local csEntity = petEntity:getCsEntity()
  self.csPlayer:AddMount(csEntity)
end

function this:setUnbelievableTime()
end

function this:isUnbelievable()
  return false
end

function this:onDestroy()
  C_EntityManager.RemoveEntityWithEntityId(self.csPlayer.data.entityId)
end

return this
