Tool
in package
Uses
DeathMessage, Name, Substitute, Taunt, Title
Table of Contents
- $buffer : mixed
- $cache : mixed
- $dispatcher : mixed
- $doctrine : mixed
- $request : mixed
- $response : mixed
- $settings : mixed
- $translator : mixed
- __construct() : mixed
- addNews() : void
- Adds a news item for the current user.
- changePlayerCtitle() : string
- changePlayerName() : string
- changePlayerTitle() : string
- checkBan() : void
- Check if user have a ban.
- expForNextLevel() : int
- Returns the experience needed to advance to the next level.
- getDkTitle() : string
- Get a title for a DK
- getMount() : array<string|int, mixed>|null
- Get info of mount by ID.
- getPartner() : string
- Get name of partner.
- getPlayerBasename() : string
- getPlayerCBasename() : string
- getPlayerTitle() : string
- holidayize() : string
- saveUser() : void
- Save user data and character.
- selectDeathMessage() : array<string|int, mixed>
- Select 1 death message.
- selectTaunt() : array<string|int, mixed>
- Select 1 taunt.
- setResponse() : self
- substitute() : mixed
- substituteArray() : mixed
- validDkTitle() : bool
- Validate DK title
Properties
$buffer
private
mixed
$buffer
$cache
private
mixed
$cache
$dispatcher
private
mixed
$dispatcher
$doctrine
private
mixed
$doctrine
$request
private
mixed
$request
$response
private
mixed
$response
$settings
private
mixed
$settings
$translator
private
mixed
$translator
Methods
__construct()
public
__construct(EventDispatcherInterface $dispatcher, EntityManagerInterface $doctrine, Settings $settings, Request $request, TranslatorInterface $translator, Buffer $buffer, CacheInterface $cacheApp) : mixed
Parameters
- $dispatcher : EventDispatcherInterface
- $doctrine : EntityManagerInterface
- $settings : Settings
- $request : Request
- $translator : TranslatorInterface
- $buffer : Buffer
- $cacheApp : CacheInterface
Return values
mixed —addNews()
Adds a news item for the current user.
public
addNews(string $text[, array<string|int, mixed> $params = [] ][, string $textDomain = 'partial_news' ][, bool $hideFromBio = false ]) : void
Parameters
- $text : string
- $params : array<string|int, mixed> = []
- $textDomain : string = 'partial_news'
- $hideFromBio : bool = false
Return values
void —changePlayerCtitle()
public
changePlayerCtitle(mixed $nctitle[, mixed $old = false ]) : string
Parameters
- $nctitle : mixed
- $old : mixed = false
Return values
string —changePlayerName()
public
changePlayerName(mixed $newname[, mixed $old = null ]) : string
Parameters
- $newname : mixed
- $old : mixed = null
Return values
string —changePlayerTitle()
public
changePlayerTitle(mixed $ntitle[, mixed $old = null ]) : string
Parameters
- $ntitle : mixed
- $old : mixed = null
Return values
string —checkBan()
Check if user have a ban.
public
checkBan([string|null $login = null ]) : void
Parameters
- $login : string|null = null
Return values
void —expForNextLevel()
Returns the experience needed to advance to the next level.
public
expForNextLevel(int $curlevel, int $curdk) : int
Parameters
- $curlevel : int
-
the current level of the player
- $curdk : int
-
the current number of dragonkills
Return values
int —the amount of experience needed to advance to the next level
getDkTitle()
Get a title for a DK
public
getDkTitle(mixed $dks, mixed $gender[, mixed $ref = null ]) : string
Parameters
- $dks : mixed
- $gender : mixed
- $ref : mixed = null
Return values
string —getMount()
Get info of mount by ID.
public
getMount(int $horse) : array<string|int, mixed>|null
Parameters
- $horse : int
Return values
array<string|int, mixed>|null —getPartner()
Get name of partner.
public
getPartner([bool $player = false ]) : string
Parameters
- $player : bool = false
Return values
string —getPlayerBasename()
public
getPlayerBasename([mixed $old = null ]) : string
Parameters
- $old : mixed = null
Return values
string —getPlayerCBasename()
public
getPlayerCBasename([mixed $old = null ]) : string
Parameters
- $old : mixed = null
Return values
string —getPlayerTitle()
public
getPlayerTitle([mixed $old = null ]) : string
Parameters
- $old : mixed = null
Return values
string —holidayize()
public
holidayize(string $text[, string $type = 'unknown' ]) : string
Parameters
- $text : string
- $type : string = 'unknown'
Return values
string —saveUser()
Save user data and character.
public
saveUser([bool $updateLastOn = true ][, bool $regenSession = false ]) : void
Parameters
- $updateLastOn : bool = true
- $regenSession : bool = false
Return values
void —selectDeathMessage()
Select 1 death message.
public
selectDeathMessage([string $zone = 'forest' ][, array<string|int, mixed> $extraParams = [] ]) : array<string|int, mixed>
Parameters
- $zone : string = 'forest'
- $extraParams : array<string|int, mixed> = []
Return values
array<string|int, mixed> —selectTaunt()
Select 1 taunt.
public
selectTaunt([array<string|int, mixed> $extraParams = [] ]) : array<string|int, mixed>
Parameters
- $extraParams : array<string|int, mixed> = []
Return values
array<string|int, mixed> —setResponse()
public
setResponse(Response $response) : self
Parameters
- $response : Response
Tags
Return values
self —substitute()
public
substitute(string|null $string[, array<string|int, mixed>|null $extraSearch = null ][, array<string|int, mixed>|null $extraReplace = null ]) : mixed
Parameters
- $string : string|null
- $extraSearch : array<string|int, mixed>|null = null
- $extraReplace : array<string|int, mixed>|null = null
Return values
mixed —substituteArray()
public
substituteArray(string|null $string[, array<string|int, mixed>|null $extraSearch = null ][, array<string|int, mixed>|null $extraReplace = null ]) : mixed
Parameters
- $string : string|null
- $extraSearch : array<string|int, mixed>|null = null
- $extraReplace : array<string|int, mixed>|null = null
Return values
mixed —validDkTitle()
Validate DK title
public
validDkTitle(mixed $title, mixed $dks, mixed $gender) : bool
Parameters
- $title : mixed
- $dks : mixed
- $gender : mixed