初始化仓库:友乐/gameabc 房卡游戏平台脚手架(client + server + docs)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 18:13:26 +08:00
co-authored by Claude Opus 5
commit 594820d393
655 changed files with 310861 additions and 0 deletions
+49
View 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();