This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Проверка достаточно ли XP для поднятия уровня | |
*/ | |
public function CheckLevelUp() { | |
if ($this->xpSinceLastLevelUp() >= $this->nettoXpNeededForLevel($this->oPlayer->getLevel() +1)) { | |
// Повышаем левел | |
$this->oPlayer->setLevel($this->oPlayer->getLevel()+1); | |
$this->Cache_Set($this->oPlayer->getLevel()+1, "user_level_{$this->oPlayer->getId()}", array(), 60*60*24*4); | |
// Увеличиваем максимальный HP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('util'), | |
path = require('path'), | |
fs = require('fs'), | |
config = require('../config'), | |
profiler = require('./lib/profiler').profiler, | |
httpcli = require("./lib/httpclient"), | |
module = require('./module').module; | |
var profiler = new profiler(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PluginMap_ActionSettings extends PluginMap_Inherit_ActionSettings { | |
/** | |
* Регистрируем евенты | |
*/ | |
protected function RegisterEvent() { | |
parent::RegisterEvent(); | |
$this->AddEvent('map','EventMap'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* https://github.com/kohana/core/blob/3.2/master/classes/kohana/request.php | |
* https://github.com/kohana/core/blob/3.2/master/classes/kohana/route.php | |
* https://github.com/kohana/core/blob/3.2/master/classes/kohana/response.php | |
* | |
* https://github.com/laravel/laravel/blob/master/laravel/routing/route.php | |
* https://github.com/laravel/laravel/blob/master/laravel/routing/router.php | |
* https://github.com/laravel/laravel/blob/master/laravel/response.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function AssignDataForMap($oUserCurrent=NULL) { | |
if(!$oUserCurrent) { | |
/** | |
* Пользователь авторизован? | |
*/ | |
if (!$oUserCurrent = $this->User_GetUserCurrent()) { | |
return array(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{include file='topic_part_header.tpl'} | |
<div class="topic-content text"> | |
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList} | |
{if $bTopicList} | |
{$oTopic->getTextShort()} | |
{if $oTopic->getTextShort()!=$oTopic->getText()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
function c() { | |
var e = document.createElement("link"); | |
e.setAttribute("type", "text/css"); | |
e.setAttribute("rel", "stylesheet"); | |
e.setAttribute("href", f); | |
e.setAttribute("class", l); | |
document.body.appendChild(e) | |
} | |
function h() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
_id: ObjectId("51a7701a1805753fed000001"), | |
name: "Нижний Новгород", | |
alias: "nn", | |
areas: [ | |
{ | |
_id: ObjectId("51a7701a1805753fed000002"), | |
name: "Автозаводский" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://localhost:8000/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://localhost:8000', { | |
transports: ["websocket", "flashsocket", "xhr-polling"], | |
reconnect: !0, | |
"reconnection delay": 500, | |
"reopen delay": 500, | |
"max reconnect attempts": 5 | |
}); | |
socket.on('news', function (data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Builds and returns the url of the socket transport endpoint | |
@method ioUrl | |
@return {String} The base url where our streaming api lives | |
**/ | |
ioUrl : function() { | |
var cfg = (CL.Cfg.Node) ? CL.Cfg.Node : CL.Cfg.Stream; | |
return cfg.transport + '://' + cfg.host + ':' + cfg.port; | |
}, |