本文整理汇总了PHP中TenYear::game_name方法的典型用法代码示例。如果您正苦于以下问题:PHP TenYear::game_name方法的具体用法?PHP TenYear::game_name怎么用?PHP TenYear::game_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TenYear
的用法示例。
在下文中一共展示了TenYear::game_name方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: achieve_repair
public function achieve_repair($player_id)
{
# 修复一下符文成就相关的数据[NOTE:刷新成就相关脏数据用]
TenYear::getInstance(TenYear::game_name('PlayerSkill'))->handle_rune_refer_achieve($player_id);
# 修复一下天赋成就相关的数据[NOTE:刷新成就相关脏数据用]
TenYear::getInstance(TenYear::game_name('PlayerSkill'))->handle_dower_refer_achieve($player_id);
echo $player_id . "sync suc \n";
}
示例2: get_game
/**
* 获取逻辑对象
*
* @param unknown_type $name 类简写
* @param unknown_type $isOne 创建新对象
* @return unknown
*/
protected function get_game($name, $isOne = false)
{
$className = TenYear::game_name($name);
if ($isOne) {
return new $className();
}
//$this->_objGame[$className]++;
return TenYear::getInstance($className);
}
示例3: add_unions
public function add_unions($player_id, $friend_id)
{
try {
$objdata = TenYear::getInstance(TenYear::game_name('PlayerFriend'));
$objdata->add_unions($player_id, $friend_id);
echo "send success {$player_id}";
} catch (Exception $e) {
$error = "Exception: " . $e->getFile() . " line:" . $e->getLine() . " " . $e->getMessage();
echo $error;
}
}
示例4: fb
public function fb()
{
$sql = "select * from test_account";
$this->query($sql);
$arr_player = array();
while ($this->next_record()) {
$player_id = $this->get_field('player_id');
$arr_player[] = $player_id;
}
foreach ($arr_player as $player_id) {
$obj = TenYear::getInstance(TenYear::game_name('PlayerFB'));
$obj->get_chapter_fb_info($player_id, 0, 0);
echo "player:{$player_id} suc\n";
}
}
示例5: run
public function run()
{
$keys = Com_AdCache::factory('player')->keys("data|player:*");
if (!empty($keys)) {
foreach ($keys as $key) {
$player_info = $this->redis()->hash_get($key, array('player_id', 'level', 'union_id'));
if (intval($player_info['player_id']) <= 0) {
continue;
}
if (intval($player_info['level']) < 20) {
continue;
}
$objPlayerProp = TenYear::getInstance(TenYear::data_name('PlayerProp'));
$player_props = $objPlayerProp->get_player_all_prop($player_info['player_id']);
foreach ($player_props as $prop) {
if (isset($prop['intensive_level'])) {
echo "player_id={$player_info['player_id']}|player_prop_id={$prop['player_prop_id']}\n";
$objPlayerAchieve = TenYear::getInstance(TenYear::game_name('PlayerAchieve'));
$objPlayerAchieve->async_trigger_achieve_target($player_info['player_id'], 6, "1:" . $prop['quality'] . ":" . $prop['star_level'] . ":" . intval($prop['intensive_level']) . ":{$prop['player_prop_id']}", 4);
}
}
}
}
}
示例6: flush_sum_fpower_for_dummy
private function flush_sum_fpower_for_dummy($player_id)
{
$objFpowerCalc = TenYear::getInstance(TenYear::game_name('FpowerCalc'));
$fpower_arr = $objFpowerCalc->calc_player_fpower($player_id);
# 人物模块战力
$equip_fpower = $objFpowerCalc->calc_equip_fpower($player_id);
# 装备模块战力
$sq_fpower = $objFpowerCalc->calc_sq_fpower($player_id);
# 圣器模块战力
$fairy_fpower = $objFpowerCalc->calc_fairy_fpower($player_id);
# 女神模块战力
$hero_fpower = $objFpowerCalc->calc_hero_fpower($player_id);
# 英雄模块战力
$skill_fpower = $objFpowerCalc->calc_skill_fpower($player_id);
# 技能模块战力
$wing_fpower = $objFpowerCalc->calc_wing_fpower($player_id);
# 翅膀模块战力
#var_export($fpower);
$fpower = $fpower_arr['fpower'] + $sq_fpower + $skill_fpower + $equip_fpower;
$sum_fpower = $fpower + $hero_fpower + $fairy_fpower + $wing_fpower;
#echo "fpower:{$fpower} sq_fpower:{$sq_fpower} equip_fpower:{$equip_fpower} skill_fpower:{$skill_fpower} wing_fpower:{$wing_fpower} hero_fpower:{$hero_fpower} fairy_fpower:{$fairy_fpower}\n";
#echo "sum_fpower:{$sum_fpower}\n";
TenYear::getInstance('Data_Player')->update_player_info($player_id, array('fpower' => $fpower, 'sum_fpower' => $sum_fpower));
}
示例7: run
public function run()
{
TenYear::getInstance(TenYear::game_name('GrabTreasure'))->crontab_kf_player_info(1);
}
示例8:
</style>
<script type="text/javascript" src="<?php
echo MEDIA_SERVER_HOST;
?>
/swfobject.js"></script>
<?php
if (!$_SESSION['player_flash_ver_flag']) {
?>
<script type="text/javascript" src="<?php
echo MEDIA_SERVER_HOST;
?>
/jquery-1.4.2.min.js"></script>
<?php
}
if (OPERATOR_ID == 82) {
$app_id = TenYear::getInstance(TenYear::game_name('Tencent'))->appid;
?>
<script type="text/javascript" charset="utf-8"
src="http://fusion.qq.com/fusion_loader?appid=<?php
echo $app_id;
?>
&platform=<?php
echo $_SESSION['platform'];
?>
">
</script>
<?php
}
if (OPERATOR_ID == 69) {
?>
<script src="http://ext.1360.com/pumper.js?c=game&gkey=nsol" type="text/javascript"></script>
示例9: update_player_fame
public function update_player_fame($player_id, $fame)
{
$objPropGame = TenYear::getInstance(TenYear::game_name('Reward'));
$reward = array();
$reward[] = array('type' => 'fame', 'item_id' => 14, 'item_num' => $fame);
$objPropGame->send_reward($player_id, $reward);
$objPropGame->add_reward_log();
Protocol::out();
echo "添加成功";
}
示例10: get_game
/**
* 获取逻辑对象
* @param string $name 类简写
* @param boolean $isOne 创建新对象
* @return obj
*/
protected static function get_game($name, $isOne = false)
{
$className = TenYear::game_name($name);
if ($isOne) {
return new $className();
}
return TenYear::getInstance($className);
}
示例11: define
* @date : 2011-6-27
*
****/
define('UUZU_AUTH', 0);
require dirname(__FILE__) . '/../global.php';
TenYear::getInstance();
$action = $_POST['action'];
if (!$action) {
exit;
}
switch ($action) {
case 'RandomName':
//随机取名
$sex = $_POST['sex'] == '1' ? 1 : 0;
// Com_Log::write('random_name',$_POST['sex']);
$objPlayerInitGame = TenYear::getInstance(TenYear::game_name('PlayerInit'));
$playerName = $objPlayerInitGame->createRandomName($sex);
//echo pack('a' . strlen($playerName), $playerName);
//$data = pack('Ca' . strlen($playerName), strlen($playerName), $playerName);
//echo output($data, 1, 1);
echo $playerName;
exit;
break;
case 'DataCenter':
//数据跟踪第三步
// if(!isset($_SESSION['trace_activate_12'])) {
// $twoArr = array('account'=>$_SESSION["account"],'step'=>12,'ip'=>Com_System::get_client_ip());
// $dataLog = Com_System::send_dataRequest($twoArr,'trace_activate');
// $_SESSION['trace_activate_12'] = 1;
// TenYear::getInstance('Game_Online')->write_session();
// }
示例12: asyn_call_func
/**
* 异步回调方法
*
* @param unknown_type $className 类名
* @param unknown_type $classType 类类型 game, data, 空则表示全名
* @param unknown_type $function 方法名
* @param unknown_type $params 参数数组
* @return unknown
*/
public static function asyn_call_func($className, $classType, $function, $params)
{
$call = array();
if ($classType == 'game') {
$class['class'] = TenYear::game_name($className);
} elseif ($classType == 'data') {
$class['class'] = TenYear::data_name($className);
} else {
$class['class'] = $className;
}
$class['function'] = $function;
$class['params'] = $params;
return Com_Queued::send(self::$asynCallQueue, json_encode($class));
}