84 lines
2.1 KiB
Plaintext
84 lines
2.1 KiB
Plaintext
/*
|
|
文件名:GetDamageRate.nut
|
|
路径:Base/CallBack/GetDamageRate.nut
|
|
创建日期:2024-08-09 14:10
|
|
文件用途:获取伤害倍率
|
|
*/
|
|
RindroDamageRate <- 1.0;
|
|
|
|
function L_getCurrentModuleDamageRate(obj) {
|
|
if (!obj)
|
|
return 1.0;
|
|
|
|
local ClientRat = 1.0;
|
|
try {
|
|
ClientRat = getCurrentModuleDamageRate(obj).tofloat();
|
|
} catch (exception) {
|
|
ClientRat = 1.0;
|
|
}
|
|
|
|
return (RindroDamageRate * ClientRat);
|
|
}
|
|
|
|
|
|
function Lenheart_GetDamageRate_Fun(obj) {
|
|
//在城镇时
|
|
if (sq_GetCurrentModuleType() == 1) {
|
|
RindroDamageRate = 1.0;
|
|
}
|
|
}
|
|
|
|
//修改伤害回调
|
|
function SetDamageRateCallBack(Chunk) {
|
|
local Jso = Json.Decode(Chunk);
|
|
RindroDamageRate = Jso.rate;
|
|
}
|
|
Pack_Control.rawset(2024110902, SetDamageRateCallBack);
|
|
|
|
getroottable()["LenheartFuncTab"].rawset("GetDamageRateFuncN", Lenheart_GetDamageRate_Fun);
|
|
|
|
|
|
// ModuleDamageTable <- {
|
|
// //这个1是 副本编号
|
|
// [1] = {
|
|
// //这个0是大职业编号 比如说鬼剑士就是 0 女格斗家就是 1 在character/character.lst 这个文件里可以看
|
|
// [0] = {
|
|
// //这个0 和 1 是转职编号 0就是未转职 1 就是转了剑魂
|
|
// [0] = 1.0,
|
|
// [1] = 3.0
|
|
// }
|
|
// },
|
|
// //2号副本
|
|
// [2] ={
|
|
// //女格斗家职业
|
|
// [1] = {
|
|
// [0] = 1.0,
|
|
// [1] = 3.0
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
// function getCurrentModuleDamageRate(obj)
|
|
// {
|
|
// local Rate = 1.0;
|
|
// local stage = sq_GetGlobaludpModuleStage();
|
|
// local dungeon = sq_GetDungeonByStage(stage);
|
|
// local dungeonIndex = sq_GetDuegonIndex(dungeon);
|
|
|
|
// local LLJob = sq_getJob(obj);
|
|
// local LLGrowT = sq_getGrowType(obj);
|
|
|
|
// //处于生效副本中
|
|
// if(ModuleDamageTable.rawin(dungeonIndex)){
|
|
// //自己是生效职业
|
|
// if(ModuleDamageTable[dungeonIndex].rawin(LLJob)){
|
|
// //是生效转职
|
|
// if(ModuleDamageTable[dungeonIndex][LLJob].rawin(LLGrowT)){
|
|
// Rate += ModuleDamageTable[dungeonIndex][LLJob][LLGrowT].tofloat();
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
// return Rate;
|
|
// } |