<?php

/**
 * 获取战令信息
 */

namespace Game\Controller\Task;

use Framework\Define\ErrorDefine;
use Framework\MVC\ControllerBase;
use Framework\MVC\ModelManager;
use Game\Constant\ModelTypeDefine;
use Game\Model\Task\WarTokenModel;
use Game\Protobuf\CGZLInfo;

class CG_ZLInfo extends ControllerBase
{
    public function __construct()
    {
        $this->message = new CGZLInfo();
    }

    public function run(): int
    {
        /**
         * @var WarTokenModel $warTokenModel
         */
        $warTokenModel = ModelManager::getInstance()->getModel(ModelTypeDefine::WAR_TOKEN);
        $warTokenModel->sendMessage();
        return ErrorDefine::SUCCESS;
    }
}
