承接 freedomcore/trinitycore-console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

freedomcore/trinitycore-console

Composer 安装命令:

composer require freedomcore/trinitycore-console

包简介

TrinityCore Console Library

README 文档

README

Latest Version on Packagist Software License Build Status Code Quality Code Coverage StyleCI Total Downloads

Creating SOAP account

In order to be able to use library, you have to create a dedicated SOAP account first.
To do so, execute the following command in your worldserver console
accont create 2#1 accountPassword
where:

  1. 2#1 - account ID, can be anything, but i suggest to use the next available id for the account
  2. accountPassword - a secure password for your SOAP account

After it is done, we need to grant privileges to the account, this can be done by using the following command
account set gmlevel 2#1 3 -1

Initializing connection to the SOAP service

After SOAP account is created, we can proceed to the connection initialization for the library
$console = new \FreedomCore\TrinityCore\Console\Client('2#1', 'accountPassword');
That is it. Now you can use the library!

Available Methods

Current implementation of the console client has the following 'endpoints':

  1. account() - Allows you to perform various operations on specific account
  2. bnet() - Allows you to manage related battle.net settings
  3. character() - Allows you to perform various operations on specific settings
  4. gm() - Allows you to 'talk' to GMs
  5. guild() - Allows you to manage different guild specific settings
  6. lfg() - Provides information about the LFG system
  7. reset() - Allows you to reset different aspects of the character (or, all characters on the server)
  8. server() - Allows you to manage different server related settings
  9. send() - Allows you to send in-game mail

Client Options

  • setAddress - Set Server Address
    $console->setAddress(string $serverAddress);
  • getAddress - Get Server Address
    $console->getAddress();
  • setPort - Set Server Port
    $console->setPort(int $serverPort);
  • getPort - Get Server Port
    $console->getPort();
  • getVersion - Get Client Version
    $console->getVersion();
  • createConnection - Initialize Connection To The Server (needs to be invoked if address/port has been changed)
    $console->createConnection();
  • getClient - Get Client Instance
    $console->getClient();

$console->account()

  • create() - Create new account
    $result = $console->account()->create(string $account, string $password);
  • delete() - Delete specified account
    $result = $console->account()->delete(string $account);
  • password() - Set new password for the account
    $result = $console->account()->password(string $oldPassword, string $newPassword, string $repeatPassword);
  • setAddon() - Set expansion version for specified account
    $result = $console->account()->setAddon(string $account, int $addon);
  • setGmLevel() - Set Game Mater Level For Account
    $result = $console->account()->setGmLevel(string $account, int $level, int $realm = -1);
  • setSecRegmail() - Sets the regmail for specified account
    $result = $console->account()->setSecRegmail(string $account, string $regMail, string $repeatRegMail);
  • setSecEmail() - Set the email for specified account
    $result = $console->account()->setSecEmail(string $account, string $email, string $repeatEmail);
  • setPassword() - Set password for account.
    $result = $console->account()->setPassword(string $oldPassword, string $newPassword, string $repeatPassword);

$console->bnet()

  • create - Create new battle.net account
    $result = $console->bnet()->create(string $email, string $password);
  • gameAccountCreate - Create game account for specified battle.net account
    $result = $console->bnet()->gameAccountCreate(string $email);
  • link - Link existing game account with battle.net account
    $result = $console->bnet()->link(string $email, string $login);
  • unlink - Unlink existing account from specified battle.net account
    $result = $console->bnet()->unlink(string $account, string $password);
  • listGameAccounts - List game account on specified battle.net account
    $result = $console->bnet()->listGameAccounts(string $email);
  • setPassword - Set new password for specified battle.net account
    $result = $console->bnet()->setPassword(string $email, string $password, string $repeatPassword);

$console->character()

  • unstuck - Teleport specified player to specified location
    $result = $console->character()->unstuck(string $playerName, string $location = 'graveyard');
  • unmute - Restore messaging functionality for specified character
    $result = $console->character()->unmute(string $playerName);
  • unban - Unban character by name
    $result = $console->character()->unban(string $playerName, $function = 'character');
  • ban - Ban specified character
    $result = $console->character()->ban(string $playerName, $function = 'character');
  • mute - Disable characters messaging functionality
    $result = $console->character()->mute(string $playerName, int $minutes, $reason = 'No reason given!');
  • kick - Kick player from game world
    $result = $console->character()->kick(string $playerName, string $reason = 'No reason given!');
  • customize - Send "customise character" request on next login
    $result = $console->character()->customize(string $playerName);
  • changeFaction - Send "change faction" request on next login
    $result = $console->character()->changeFaction(string $playerName);
  • changeRace - Send "change race" request on next login
    $result = $console->character()->changeRace(string $playerName);
  • erase - Completely delete character
    $result = $console->character()->erase(string $playerName);
  • level - Increase/Decrease character level by the provided value
    $result = $console->character()->level(string $playerName, int $level = 1);
  • rename - Send "change name" request on next login. IF $newName is provided, name will be forcefully changed
    $result = $console->character()->rename(string $oldName, string $newName = '');
  • reputation - Show reputation information for selected character. Player MUST be online
    $result = $console->character()->reputation(string $playerName);
  • titles - Show titles known by character. Player MUST be online
    $result = $console->character()->titles(string $playerName);
  • deletedDelete - Delete characters which contain specified string in their name
    $result = $console->character()->deletedDelete(string $playerName);
  • deletedList - Show deleted characters with specified string in their names
    $result = $console->character()->deletedList(string $playerName);
  • deletedRestore - Restore deleted characters with specified string in their names
    $result = $console->character()->deletedRestore(string $playerName);
  • deletedOld - Delete characters which was deleted more than $days ago
    $result = $console->character()->deletedOld(string $playerName, int $days);

$console->gm()

  • announce - Send announcement to all Game Masters
    $result = $console->gm()->announce(string $announcement);
  • nameAnnounce - Send announcement to all Game Masters (as console)
    $result = $console->gm()->nameAnnounce(string $announcement);
  • notify - Send notification ot all Game Masters
    $result = $console->gm()->notify(string $notification);

$console->guild()

  • create - Create new guild. Player MUST be online
    $result = $console->guild()->create(string $leaderName, string $guildName);
  • delete - Delete specified guild
    $result = $console->guild()->delete(string $guildName);
  • invite - Invite Specified Player To Specified Guild
    $result = $console->guild()->invite(string $playerName, string $guildName);
  • rename - Rename Guild
    $result = $console->guild()->rename(string $oldName, string $newName);
  • info - Get Information About Specified Guild
    $result = $console->guild()->info(string $guildName);

$console->lfg()

  • queue - Show information about current LFG queues
    $result = $console->lfg()->queue();
  • clean - Cleans current queue, only for DEBUG
    $result = $console->lfg()->clean();
  • options - Shows current LFG options. IF value is set, updates existing value.
    $result = $console->lfg()->options($value = '');

$console->reset()

  • achievements - Reset achievements for specified player
    $result = $console->reset()->achievements(string $playerName);
  • honor - Reset honor for specified player
    $result = $console->reset()->honor(string $playerName);
  • level - Reset level for specified player
    $result = $console->reset()->level(string $playerName);
  • spells - Reset spells for specified player
    $result = $console->reset()->spells(string $playerName);
  • stats - Reset stats for specified player
    $result = $console->reset()->stats(string $playerName);
  • talents - Reset talents for specified player
    $result = $console->reset()->talents(string $playerName);
  • all - Reset $type (talents/spells) for ALL players
    $result = $console->reset()->all(string $type);

$console->send()

  • items - Send Items To The Player (This method require you to also import freedomcore/trinitycore-support library)
    $console->send()->items(string $playerName, string $mailSubject, string $mailText, Items $items);
  • mail - Send mail to the player
    $console->send()->mail(string $playerName, string $mailSubject, string $mailText);
  • message - Send message to the player which will appear in the middle of the screen
    $console->send()->message(string $playerName, string $message);
  • money - Send money to the player
    $console->send()->money(string $playerName, string $mailSubject, string $mailText, int $amount);

$console->server()

  • corpses - Trigger corpses expire check in world
    $result = $console->server()->corpses();
  • exit - Terminate server NOW. Exit code 0
    $result = $console->server()->exit();
  • info - Display server version and the number of connected players
    $result = $console->server()->info();
  • motd - Show message of the day
    $result = $console->server()->motd();
  • plimit - Without the argument passed, it will display current limit for players. With argument greater that 0, it will set the new limit for max players. 'reset' parameter may be used to set the value from config.
    $result = $console->server()->plimit($parameter = '');
  • setDiffTime - Set Diff Time For Sever
    $result = $console->server()->setDiffTime(int $diffTime);
  • setLogLevel - Set Log Level For Server
    $result = $console->server()->setLogLevel(string $facility, string $name, int $logLevel);
  • setMotd - Set new message of the day
    $result = $console->server()->setMotd(string $motd);
  • setClosed - Sets whether the world accepts new client connections
    $result = $console->server()->setClosed(bool $isClosed);
  • shutdown - Shutdown server
    $result = $console->server()->shutdown(int $timer, bool $force = false, int $code = 0);
  • shutdownCancel - Cancel the restart/shutdown timer if any
    $result = $console->server()->shutdownCancel();
  • saveAll - Save all players.
    $result = $console->server()->saveAll();
  • notify - Display a message to all online players
    $result = $console->server()->notify(string $message);
  • announce - Send announcement
    $result = $console->server()->announce(string $message);

P.S.

If you found any errors, or would like to suggest some 'extra' functionality, feel free to create a new ISSUE.

freedomcore/trinitycore-console 适用场景与选型建议

freedomcore/trinitycore-console 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33 次下载、GitHub Stars 达 6, 最近一次更新时间为 2017 年 12 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「console」 「trinitycore」 「freedomcore」 「libarary」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 freedomcore/trinitycore-console 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 freedomcore/trinitycore-console 我们能提供哪些服务?
定制开发 / 二次开发

基于 freedomcore/trinitycore-console 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 4
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-25