huangyuhao80 da5985586a 更新引擎 1 gün önce
..
base da5985586a 更新引擎 1 gün önce
bonus da5985586a 更新引擎 1 gün önce
common da5985586a 更新引擎 1 gün önce
competition da5985586a 更新引擎 1 gün önce
condition da5985586a 更新引擎 1 gün önce
count da5985586a 更新引擎 1 gün önce
duplicate da5985586a 更新引擎 1 gün önce
equip da5985586a 更新引擎 1 gün önce
fight da5985586a 更新引擎 1 gün önce
gm da5985586a 更新引擎 1 gün önce
item da5985586a 更新引擎 1 gün önce
maste da5985586a 更新引擎 1 gün önce
player da5985586a 更新引擎 1 gün önce
recharge da5985586a 更新引擎 1 gün önce
sys da5985586a 更新引擎 1 gün önce
talent da5985586a 更新引擎 1 gün önce
task da5985586a 更新引擎 1 gün önce
union da5985586a 更新引擎 1 gün önce
utils da5985586a 更新引擎 1 gün önce
AGAndSD.lua da5985586a 更新引擎 1 gün önce
API.lua da5985586a 更新引擎 1 gün önce
Activity.lua 5f23315e57 首次提交 8 ay önce
ActivityManager.lua da5985586a 更新引擎 1 gün önce
ActivityMonsterAttack.lua 7eff2545f9 同步版本1.0.29 7 ay önce
ActivityMonsterAttack_1.lua da5985586a 更新引擎 1 gün önce
Activity_1.lua da5985586a 更新引擎 1 gün önce
AngelBenefit.lua 7eff2545f9 同步版本1.0.29 7 ay önce
AngelBenefit_1.lua da5985586a 更新引擎 1 gün önce
AngelWeapon.lua 5f23315e57 首次提交 8 ay önce
AngelWeapon_1.lua da5985586a 更新引擎 1 gün önce
AutoBuyPotion.lua 5f23315e57 首次提交 8 ay önce
AutoBuyPotion_1.lua da5985586a 更新引擎 1 gün önce
Bag.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Bag_1.lua da5985586a 更新引擎 1 gün önce
BossBounty.lua 5f23315e57 首次提交 8 ay önce
BossBounty_1.lua da5985586a 更新引擎 1 gün önce
BubblePoint.lua 5f23315e57 首次提交 8 ay önce
BubblePoint_1.lua da5985586a 更新引擎 1 gün önce
Buffer.lua 5f23315e57 首次提交 8 ay önce
Buffer_1.lua da5985586a 更新引擎 1 gün önce
CareerUnlock.lua 5f23315e57 首次提交 8 ay önce
CareerUnlock_1.lua da5985586a 更新引擎 1 gün önce
Ceshitongyonglua.lua 5f23315e57 首次提交 8 ay önce
Ceshitongyonglua_1.lua da5985586a 更新引擎 1 gün önce
Chat.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Chat_1.lua da5985586a 更新引擎 1 gün önce
Constants.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Constants_1.lua da5985586a 更新引擎 1 gün önce
CrossMap.lua 7eff2545f9 同步版本1.0.29 7 ay önce
CrossMap_1.lua da5985586a 更新引擎 1 gün önce
CustomTransmit.lua 7eff2545f9 同步版本1.0.29 7 ay önce
CustomTransmit_1.lua da5985586a 更新引擎 1 gün önce
DailyActivity.lua 5f23315e57 首次提交 8 ay önce
DailyActivity_1.lua da5985586a 更新引擎 1 gün önce
Efficiency.lua 5f23315e57 首次提交 8 ay önce
Efficiency_1.lua da5985586a 更新引擎 1 gün önce
EquipAndAppear.lua 7eff2545f9 同步版本1.0.29 7 ay önce
EquipAndAppear_1.lua da5985586a 更新引擎 1 gün önce
EquipDurability.lua da5985586a 更新引擎 1 gün önce
EquipFunc.lua da5985586a 更新引擎 1 gün önce
EquipLuck.lua da5985586a 更新引擎 1 gün önce
EquipRandom.lua da5985586a 更新引擎 1 gün önce
EquipRefined.lua da5985586a 更新引擎 1 gün önce
EquipRegeneration.lua da5985586a 更新引擎 1 gün önce
Equip_QiangHua.lua da5985586a 更新引擎 1 gün önce
Equip_QiangHua_Data.lua da5985586a 更新引擎 1 gün önce
EventCfg.lua da5985586a 更新引擎 1 gün önce
FaceShootPreview.lua 5f23315e57 首次提交 8 ay önce
FaceShootPreview_1.lua da5985586a 更新引擎 1 gün önce
FashionBox.lua da5985586a 更新引擎 1 gün önce
FirstRecharge.lua 5f23315e57 首次提交 8 ay önce
FirstRecharge_1.lua da5985586a 更新引擎 1 gün önce
Friend.lua 5f23315e57 首次提交 8 ay önce
Friend_1.lua da5985586a 更新引擎 1 gün önce
Fruit.lua 5f23315e57 首次提交 8 ay önce
Fruit_1.lua da5985586a 更新引擎 1 gün önce
GameEvent.lua da5985586a 更新引擎 1 gün önce
GameHookManager.lua da5985586a 更新引擎 1 gün önce
GameMapHeart.lua 5f23315e57 首次提交 8 ay önce
GameMapHeart_1.lua da5985586a 更新引擎 1 gün önce
GlobalTimer.lua 7eff2545f9 同步版本1.0.29 7 ay önce
GlobalTimer_1.lua da5985586a 更新引擎 1 gün önce
GoldFirstKill.lua 7eff2545f9 同步版本1.0.29 7 ay önce
GoldFirstKill_1.lua da5985586a 更新引擎 1 gün önce
GoldLine.lua 5f23315e57 首次提交 8 ay önce
GoldLine_1.lua da5985586a 更新引擎 1 gün önce
GoldTask.lua 5f23315e57 首次提交 8 ay önce
GoldTask_1.lua da5985586a 更新引擎 1 gün önce
Hook.lua da5985586a 更新引擎 1 gün önce
HpMpRecover.lua 5f23315e57 首次提交 8 ay önce
HpMpRecover_1.lua da5985586a 更新引擎 1 gün önce
InterfaceEventText.lua 5f23315e57 首次提交 8 ay önce
InterfaceEventText_1.lua da5985586a 更新引擎 1 gün önce
ItemExchange.lua da5985586a 更新引擎 1 gün önce
ItemRecycling.lua 7eff2545f9 同步版本1.0.29 7 ay önce
ItemRecycling_1.lua da5985586a 更新引擎 1 gün önce
ItemSynthesis.lua 6284401997 修复合成装备:区分引用对应的配置 7 ay önce
ItemSynthesis_1.lua da5985586a 更新引擎 1 gün önce
LevelReward.lua 7eff2545f9 同步版本1.0.29 7 ay önce
LevelReward_1.lua da5985586a 更新引擎 1 gün önce
LianJi.lua da5985586a 更新引擎 1 gün önce
LineManager.lua da5985586a 更新引擎 1 gün önce
LogManager.lua 7eff2545f9 同步版本1.0.29 7 ay önce
LogManager_1.lua da5985586a 更新引擎 1 gün önce
LuaMessageIdConst.lua 7eff2545f9 同步版本1.0.29 7 ay önce
LuaMessageIdConst_1.lua da5985586a 更新引擎 1 gün önce
Mail.lua 5f23315e57 首次提交 8 ay önce
Mail_1.lua da5985586a 更新引擎 1 gün önce
MainUIProcess.lua 5f23315e57 首次提交 8 ay önce
MainUIProcess_1.lua da5985586a 更新引擎 1 gün önce
Monster.lua 2708e27a30 怪物掉落:掉落概率关闭三倍收益加成以及属性加成 7 ay önce
MonsterAttribute.lua 7eff2545f9 同步版本1.0.29 7 ay önce
MonsterAttribute_1.lua da5985586a 更新引擎 1 gün önce
MonsterHunt.lua 7eff2545f9 同步版本1.0.29 7 ay önce
MonsterHunt_1.lua da5985586a 更新引擎 1 gün önce
MonsterLegion.lua da5985586a 更新引擎 1 gün önce
Monster_1.lua da5985586a 更新引擎 1 gün önce
MonthCard.lua 5f23315e57 首次提交 8 ay önce
MonthCard_1.lua da5985586a 更新引擎 1 gün önce
Mount.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Mount_1.lua da5985586a 更新引擎 1 gün önce
NewEquipWear.lua da5985586a 更新引擎 1 gün önce
NoticeTip.lua 5f23315e57 首次提交 8 ay önce
NoticeTip_1.lua da5985586a 更新引擎 1 gün önce
NpcChest.lua 5f23315e57 首次提交 8 ay önce
NpcChest_1.lua da5985586a 更新引擎 1 gün önce
OfflineOnHook.lua 7eff2545f9 同步版本1.0.29 7 ay önce
OfflineOnHook_1.lua da5985586a 更新引擎 1 gün önce
OpenServerActivity.lua 5f23315e57 首次提交 8 ay önce
OpenServerActivity_1.lua da5985586a 更新引擎 1 gün önce
OpenServerNewActivity.lua da5985586a 更新引擎 1 gün önce
Pet.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Pet_1.lua da5985586a 更新引擎 1 gün önce
PlayerPkValue.lua 7eff2545f9 同步版本1.0.29 7 ay önce
PlayerPkValue_1.lua da5985586a 更新引擎 1 gün önce
PreferentialGift.lua 5f23315e57 首次提交 8 ay önce
PreferentialGift_1.lua da5985586a 更新引擎 1 gün önce
PrivilegeCard.lua 5f23315e57 首次提交 8 ay önce
PrivilegeCard_1.lua da5985586a 更新引擎 1 gün önce
PrivilegeMonth.lua 7eff2545f9 同步版本1.0.29 7 ay önce
PrivilegeMonth_1.lua da5985586a 更新引擎 1 gün önce
QFunction-0.lua 7eff2545f9 同步版本1.0.29 7 ay önce
QFunction-0_1.lua da5985586a 更新引擎 1 gün önce
README.md da5985586a 更新引擎 1 gün önce
RandomChest.lua 5f23315e57 首次提交 8 ay önce
RandomChest_1.lua da5985586a 更新引擎 1 gün önce
Rank.lua 5f23315e57 首次提交 8 ay önce
Rank_1.lua da5985586a 更新引擎 1 gün önce
Recharge.lua 7eff2545f9 同步版本1.0.29 7 ay önce
RechargeSevenReceive.lua 5f23315e57 首次提交 8 ay önce
RechargeSevenReceive_1.lua da5985586a 更新引擎 1 gün önce
Recharge_1.lua da5985586a 更新引擎 1 gün önce
RedPoint.lua 5f23315e57 首次提交 8 ay önce
RedPoint_1.lua da5985586a 更新引擎 1 gün önce
RoleAttr.lua 7eff2545f9 同步版本1.0.29 7 ay önce
RoleAttr_1.lua da5985586a 更新引擎 1 gün önce
RoleScriptLog.lua 7eff2545f9 同步版本1.0.29 7 ay önce
RoleScriptLog_1.lua da5985586a 更新引擎 1 gün önce
SceneMap.lua 7eff2545f9 同步版本1.0.29 7 ay önce
SceneMap_1.lua da5985586a 更新引擎 1 gün önce
ScriptFightModel.lua 7eff2545f9 同步版本1.0.29 7 ay önce
ScriptFightModel_1.lua da5985586a 更新引擎 1 gün önce
SevenLogin.lua 5f23315e57 首次提交 8 ay önce
SevenLogin_1.lua da5985586a 更新引擎 1 gün önce
SiegeWar.lua da5985586a 更新引擎 1 gün önce
Skill.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Skill_1.lua da5985586a 更新引擎 1 gün önce
Stall.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Stall_1.lua da5985586a 更新引擎 1 gün önce
SummonAndChat.lua da5985586a 更新引擎 1 gün önce
Team.lua 5f23315e57 首次提交 8 ay önce
Team_1.lua da5985586a 更新引擎 1 gün önce
TimeLimitGift.lua 5f23315e57 首次提交 8 ay önce
TimeLimitGift_1.lua da5985586a 更新引擎 1 gün önce
Trade.lua 7eff2545f9 同步版本1.0.29 7 ay önce
Trade_1.lua da5985586a 更新引擎 1 gün önce
Transaction.lua da5985586a 更新引擎 1 gün önce
TripleIncome.lua 5f23315e57 首次提交 8 ay önce
TripleIncome_1.lua da5985586a 更新引擎 1 gün önce
TurntableRaffle.lua 5f23315e57 首次提交 8 ay önce
TurntableRaffle_1.lua da5985586a 更新引擎 1 gün önce
UseSelfChoiceBox.lua 5f23315e57 首次提交 8 ay önce
UseSelfChoiceBox_1.lua da5985586a 更新引擎 1 gün önce
WarFlag.lua da5985586a 更新引擎 1 gün önce
WorldBoss.lua da5985586a 更新引擎 1 gün önce
WorldBossAuction.lua da5985586a 更新引擎 1 gün önce
XiaoXiZhuCe.lua da5985586a 更新引擎 1 gün önce
combine.lua 7eff2545f9 同步版本1.0.29 7 ay önce
combine_1.lua da5985586a 更新引擎 1 gün önce
sys.lua 7eff2545f9 同步版本1.0.29 7 ay önce
sys_1.lua da5985586a 更新引擎 1 gün önce

README.md

世界BOSS争夺战系统设计文档

系统概述

本系统实现了三个主要活动模块:

  1. 世界BOSS争夺战 - 每周日晚8点开启,玩家争夺BOSS掉落物品
  2. 攻城战 - 开服2周后开启,战盟争夺城堡控制权
  3. 怪物军团 - 每周三、周五晚上7点开启,抵御怪物入侵

系统架构

模块结构

ActivityManager.lua          # 活动管理器(主控制器)
├── WorldBoss.lua           # 世界BOSS争夺战系统
├── WorldBossAuction.lua    # 世界BOSS拍卖系统
├── SiegeWar.lua            # 攻城战系统
└── MonsterLegion.lua       # 怪物军团系统

数据持久化

系统使用Lua内置的持久化API:

  • setsysvar() / getsysvar() - 系统级全局变量
  • setplaydef() / getplaydef() - 玩家级变量
  • setguilddef() / getguilddef() - 战盟级变量

世界BOSS争夺战系统

活动流程

  1. 报名阶段(30分钟)

    • 玩家个人报名
    • 最少50人报名才开启战斗
    • 强制战盟模式
  2. 战斗阶段(60分钟)

    • 所有报名玩家进入战场
    • PK不红名,死亡可钻石复活
    • 按个人和战盟统计伤害
  3. 拍卖阶段(30分钟)

    • 所有参与战斗的玩家可参与
    • 装备起拍价300钻石
    • 彩云兽起拍价500钻石
    • 一代坐骑/宠物起拍价2000钻石
    • 项链起拍价10000钻石

BOSS配置

炽焰魔

  • 血量:基础血量 × 2.0
  • 伤害:基础伤害 × 0.5
  • 必定掉落
    • 卓越装备2件(3-4属性)
    • 卓越套装1件(3-4属性)
  • 概率掉落
    • 彩云兽(10%)
    • 卓越项链(30%,2-3属性,必带卓越一击)

咒怨魔王

  • 血量:基础血量 × 2.5
  • 伤害:基础伤害 × 0.4
  • 必定掉落
    • 卓越装备2件(3-4属性)
    • 卓越套装2件(3-4属性)
  • 概率掉落
    • 1代坐骑(15%)
    • 1代宠物(15%)
    • 卓越项链(40%,2-3属性,必带卓越一击)

拍卖收益分配

战盟分配(按总伤害排名)

  • 第1名:50%
  • 第2名:30%
  • 第3名:20%

战盟内玩家分配(按BOSS伤害排名)

  • 第1名:30%
  • 第2名:25%
  • 第3名:20%
  • 第4名:10%
  • 第5名:5%
  • 剩余:平均分配

攻城战系统

活动流程

  1. 准备阶段(30分钟)

    • 战盟报名
    • 设置城堡血量
  2. 攻击阶段(60分钟)

    • 所有报名战盟攻击城堡
    • 攻击方伤害加成1.2倍
  3. 防守阶段(30分钟)

    • 城堡拥有者战盟防守
    • 防守方伤害加成1.5倍

城堡配置

  • 最大血量:1,000,000
  • 占领阈值:剩余血量10%
  • 奖励倍数:获胜战盟2.0倍

怪物军团系统

活动流程

  1. 准备阶段(15分钟)

    • 玩家报名
    • 生成第一波怪物
  2. 入侵阶段(5波怪物)

    • 第1波:小怪入侵(50只,100级)
    • 第2波:精英怪(30只,150级)
    • 第3波:混合部队(40只,200级)
    • 第4波:强力精英(25只,250级)
    • 第5波:军团BOSS(1只,300级)

奖励系统

  • 基础分数:100分
  • 击杀倍数:10倍
  • BOSS击杀奖励:1000分
  • 波次完成奖励:500分
  • 战盟加成:1.2倍

技术特性

数据持久化

  • 所有活动数据自动保存到数据库
  • 服务器重启后数据不丢失
  • 支持系统级、玩家级、战盟级数据存储

定时器系统

  • 自动检查活动状态
  • 自动切换活动阶段
  • 自动结束和清理活动

错误处理

  • 使用pcall保护关键函数调用
  • 详细的错误日志记录
  • 优雅的异常恢复机制

模块化设计

  • 每个活动系统独立运行
  • 统一的接口规范
  • 易于扩展和维护

使用方法

初始化系统

local ActivityManager = require("ActivityManager")
ActivityManager.Init()

获取活动信息

local activities = ActivityManager.GetAllActivitiesInfo()
for _, activity in ipairs(activities) do
    print(activity.name, activity.status, activity.timeRemaining)
end

玩家参与活动

local success, message = ActivityManager.PlayerJoinActivity(actor, 1) -- 1=世界BOSS
if success then
    print("报名成功")
else
    print("报名失败:", message)
end

获取排行榜

local playerRanking = ActivityManager.GetActivityRanking(1, "player") -- 世界BOSS玩家排名
local allianceRanking = ActivityManager.GetActivityRanking(1, "alliance") -- 世界BOSS战盟排名

配置说明

时间配置

  • 世界BOSS:每周日晚8点
  • 攻城战:开服2周后,每周六晚8点
  • 怪物军团:每周三、周五晚上7点

人数限制

  • 世界BOSS:最少50人报名
  • 攻城战:无人数限制
  • 怪物军团:最少20人报名

奖励配置

  • 拍卖手续费:20%
  • 战盟分配比例:50%、30%、20%
  • 玩家分配比例:30%、25%、20%、10%、5%

扩展建议

新增活动类型

  1. ActivityManager.lua中添加新的活动类型
  2. 创建对应的活动模块
  3. 实现统一的接口函数

自定义配置

  1. 修改各模块中的配置常量
  2. 支持从配置文件读取
  3. 支持运行时动态调整

客户端集成

  1. 实现客户端通知接口
  2. 添加UI界面支持
  3. 实现实时数据同步

注意事项

  1. 数据一致性:确保所有数据操作都使用持久化API
  2. 性能优化:避免频繁的数据库操作,合理使用缓存
  3. 错误处理:所有关键操作都要有错误处理机制
  4. 日志记录:重要事件要记录详细日志
  5. 测试验证:在测试环境充分验证后再部署到生产环境

版本历史

  • v1.0.0 - 初始版本,包含三个主要活动系统
  • 支持完整的数据持久化
  • 模块化设计,易于维护和扩展
  • 完整的错误处理和日志记录