目录结构调整
This commit is contained in:
49
codes/games/server/youle/server_agent/class.export.js
Normal file
49
codes/games/server/youle/server_agent/class.export.js
Normal file
@@ -0,0 +1,49 @@
|
||||
///////////////////////////////////////////////////
|
||||
/////// cls_youle_agent_export: 输出接口 ///////
|
||||
///////////////////////////////////////////////////
|
||||
var cls_youle_agent_export = cls_youle_agent_export || {
|
||||
|
||||
new: function() {
|
||||
|
||||
var exp = {};
|
||||
|
||||
//购买房卡或房卡充值
|
||||
exp.buy_topup = function(agentid, playerid, type, roomcard, change){
|
||||
//检查代理商id是否存在
|
||||
var o_agent = youle_agent.agents.method.find_agent(agentid);
|
||||
if (!o_agent) {
|
||||
return;
|
||||
};
|
||||
//检查玩家是否存在
|
||||
var o_player = o_agent.method.find_player(playerid);
|
||||
if (!o_player) {
|
||||
return;
|
||||
};
|
||||
|
||||
//修改房卡数量
|
||||
o_player.method.update_roomcard(type, roomcard, change);
|
||||
}
|
||||
|
||||
//购买豆豆或豆豆充值
|
||||
exp.buy_topup_bean = function(agentid, playerid, type, bean, change){
|
||||
//检查代理商id是否存在
|
||||
var o_agent = youle_agent.agents.method.find_agent(agentid);
|
||||
if (!o_agent) {
|
||||
return;
|
||||
};
|
||||
//检查玩家是否存在
|
||||
var o_player = o_agent.method.find_player(playerid);
|
||||
if (!o_player) {
|
||||
return;
|
||||
};
|
||||
|
||||
//修改豆豆数量
|
||||
o_player.method.update_bean(type, bean, change);
|
||||
}
|
||||
|
||||
return exp;
|
||||
}
|
||||
}
|
||||
|
||||
//对内输出接口
|
||||
youle_agent.export = cls_youle_agent_export.new();
|
||||
Reference in New Issue
Block a user