1111
This commit is contained in:
@@ -104,6 +104,10 @@ class ServerControl {
|
||||
local UserInfo = [];
|
||||
foreach(_Index, SUser in UserList) {
|
||||
if (SUser) {
|
||||
local growjob = SUser.GetCharacGrowType();
|
||||
if (growjob >= 16) {
|
||||
growjob = growjob - 16;
|
||||
}
|
||||
local T = {
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
@@ -112,7 +116,7 @@ class ServerControl {
|
||||
//基础职业
|
||||
job = SUser.GetCharacJob(),
|
||||
//转职职业
|
||||
growjob = SUser.GetCharacSecondGrowType(),
|
||||
growjob = SUser.GetCharacGrowType(),
|
||||
//觉醒职业
|
||||
Secondjob = SUser.GetCharacSecondGrowType(),
|
||||
//等级
|
||||
@@ -129,6 +133,9 @@ class ServerControl {
|
||||
cerapoint = SUser.GetCeraPoint(),
|
||||
//胜点
|
||||
winpoint = SUser.GetWinPoint(),
|
||||
//时装信息
|
||||
avatar = SUser.GetAva()
|
||||
|
||||
};
|
||||
UserInfo.append(T);
|
||||
} else {
|
||||
@@ -141,6 +148,51 @@ class ServerControl {
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
|
||||
//根据名称查询玩家信息
|
||||
GatewaySocketPackFuncMap.rawset(20241124, function(Jso) {
|
||||
local SUser = World.GetUserByName(Jso.Name);
|
||||
|
||||
if (SUser) {
|
||||
local T = {
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
//名字
|
||||
name = SUser.GetCharacName(),
|
||||
//基础职业
|
||||
job = SUser.GetCharacJob(),
|
||||
//转职职业
|
||||
growjob = SUser.GetCharacSecondGrowType(),
|
||||
//觉醒职业
|
||||
Secondjob = SUser.GetCharaecondGrowType(),
|
||||
//等级
|
||||
level = SUser.GetCharacLevel(),
|
||||
//使用了多少疲劳
|
||||
fatigue = SUser.GetFatigue(),
|
||||
//总疲劳
|
||||
maxfatigue = SUser.GetMaxFatigue(),
|
||||
//是否是GM
|
||||
isgm = SUser.IsGmMode(),
|
||||
//点券
|
||||
cera = SUser.GetCera(),
|
||||
//代币
|
||||
cerapoint = SUser.GetCeraPoint(),
|
||||
//胜点
|
||||
winpoint = SUser.GetWinPoint(),
|
||||
//时装信息
|
||||
avatar = SUser.GetAva()
|
||||
|
||||
};
|
||||
Jso.userinfo <- T;
|
||||
|
||||
} else {
|
||||
Jso.userinfo <- null;
|
||||
}
|
||||
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
//将玩家移出副本
|
||||
GatewaySocketPackFuncMap.rawset(20240420, function(Jso) {
|
||||
local UserList = [];
|
||||
@@ -177,6 +229,111 @@ class ServerControl {
|
||||
});
|
||||
|
||||
|
||||
//注册区域不可见hook
|
||||
GatewaySocketPackFuncMap.rawset(20241128, function(Jso) {
|
||||
local id = Jso.id;
|
||||
local Town = Jso.Town;
|
||||
local Area = Jso.Area;
|
||||
|
||||
Cb_Insert_User_Func[id] <- function(C_Area, C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser.GetLocation().Town == Town && SUser.GetLocation().Area == Area) {
|
||||
Sq_WriteAddress(C_Area, 0x68, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//设置玩家可见
|
||||
GatewaySocketPackFuncMap.rawset(20241130, function(Jso) {
|
||||
local uids = Jso.uids;
|
||||
|
||||
local RealList = [];
|
||||
foreach(uid in uids) {
|
||||
local SUser = World.GetUserByUid(uid);
|
||||
if (SUser && SUser.GetState() >= 3) RealList.append(SUser);
|
||||
}
|
||||
foreach(_Index, Value in RealList) {
|
||||
local SUser = Value;
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(0, 24);
|
||||
Pack.Put_Byte(SUser.GetLocation().Town); //城镇
|
||||
Pack.Put_Byte(SUser.GetArea(1)); //区域
|
||||
Pack.Put_Short((RealList.len() - 1)); //几个玩家 要减去自己
|
||||
foreach(__Index, MapObj in RealList) {
|
||||
if (SUser.GetUID() == MapObj.GetUID()) continue;
|
||||
Pack.Put_Short(MapObj.GetUniqueId());
|
||||
Pack.Put_Short(MapObj.GetAreaPos().X);
|
||||
Pack.Put_Short(MapObj.GetAreaPos().Y);
|
||||
Pack.Put_Byte(MapObj.GetDirections()); //朝向
|
||||
Pack.Put_Byte(MapObj.GetVisibleValues()); //是否可见
|
||||
}
|
||||
Pack.Put_Byte(1); //是否可见
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
}
|
||||
});
|
||||
|
||||
//退出可见列表
|
||||
GatewaySocketPackFuncMap.rawset(20241132, function(Jso) {
|
||||
local uids = Jso.uids;
|
||||
local uid = Jso.uid;
|
||||
local MUser = World.GetUserByUid(uid);
|
||||
|
||||
foreach(_Index, Value in uids) {
|
||||
local SUser = World.GetUserByUid(Value);
|
||||
if (!SUser || !(SUser.GetState() >= 3) || !MUser || !(MUser.GetState() >= 3)) continue;
|
||||
if (SUser.GetUID() == MUser.GetUID()) continue;
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(0, 23);
|
||||
Pack.Put_Short(MUser.GetUniqueId()); //唯一id
|
||||
Pack.Put_Byte(MUser.GetLocation().Town); //城镇
|
||||
|
||||
|
||||
Pack.Put_Byte(99); //区域
|
||||
Pack.Put_Short(MUser.GetAreaPos().X);
|
||||
|
||||
Pack.Put_Short(MUser.GetAreaPos().Y);
|
||||
Pack.Put_Byte(MUser.GetDirections()); //朝向
|
||||
Pack.Put_Byte(MUser.GetVisibleValues()); //是否可见
|
||||
Pack.Finalize(true);
|
||||
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//玩家移动回调
|
||||
GatewaySocketPackFuncMap.rawset(20241134, function(Jso) {
|
||||
|
||||
local MoveSUser = World.GetUserByUid(Jso.uid);
|
||||
if (!MoveSUser) return;
|
||||
|
||||
local uids = Jso.list;
|
||||
local RealList = [];
|
||||
foreach(uid in uids) {
|
||||
local SUser = World.GetUserByUid(uid);
|
||||
if (SUser && SUser.GetState() >= 3) RealList.append(SUser);
|
||||
}
|
||||
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(0, 22);
|
||||
Pack.Put_Short(MoveSUser.GetUniqueId());
|
||||
Pack.Put_Short(Jso.XPos);
|
||||
Pack.Put_Short(Jso.YPos);
|
||||
Pack.Put_Byte(Jso.Direction);
|
||||
Pack.Put_Short(Jso.Code);
|
||||
Pack.Finalize(true);
|
||||
|
||||
|
||||
foreach(_Index, Value in RealList) {
|
||||
local SUser = Value;
|
||||
if (SUser.GetUniqueId() == MoveSUser.GetUniqueId()) continue;
|
||||
SUser.Send(Pack);
|
||||
}
|
||||
Pack.Delete();
|
||||
});
|
||||
|
||||
//给注册玩家使用道具回调
|
||||
GatewaySocketPackFuncMap.rawset(2023110702, function(Jso) {
|
||||
@@ -200,26 +357,40 @@ class ServerControl {
|
||||
local CID = Jso.cid;
|
||||
local SUser = World.GetUserByUidCid(UID, CID);
|
||||
local ItemId = Jso.itemid;
|
||||
local num = 0;
|
||||
if (SUser) {
|
||||
//获取背包对象
|
||||
local InvenObj = SUser.GetInven();
|
||||
local SlotIdx = InvenObj.GetSlotById(ItemId);
|
||||
if (SlotIdx != -1) {
|
||||
local SlotItem = InvenObj.GetSlot(1, SlotIdx);
|
||||
if (SlotItem) {
|
||||
local Count = 1;
|
||||
if (SlotItem.GetType() != "装备") {
|
||||
Count = SlotItem.GetAdd_Info();
|
||||
}
|
||||
Jso.Count <- Count;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
return;
|
||||
|
||||
local SlotItem = InvenObj.GetSlot(1, SlotIdx);
|
||||
if (SlotItem != null && SlotItem.GetIndex() == ItemId) {
|
||||
local Count = 1;
|
||||
if (SlotItem.GetType() != "装备") {
|
||||
Count = SlotItem.GetAdd_Info();
|
||||
}
|
||||
Jso.Count <- Count;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
return;
|
||||
}
|
||||
|
||||
print(num);
|
||||
for (local i = 0; i< 120; i++) {
|
||||
local ItemObj = InvenObj.GetSlot(3, i);
|
||||
if (ItemObj != null && ItemObj.GetIndex() == ItemId) {
|
||||
num++;
|
||||
}
|
||||
|
||||
ItemObj = InvenObj.GetSlot(2, i);
|
||||
if (ItemObj != null && ItemObj.GetIndex() == ItemId) {
|
||||
num++;
|
||||
}
|
||||
};
|
||||
print(num);
|
||||
}
|
||||
|
||||
Jso.Count <- 0;
|
||||
Jso.Count <- num;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
@@ -347,7 +518,7 @@ class ServerControl {
|
||||
local InvenObj = SUser.GetInven();
|
||||
local FlagBuf = InvenObj.CheckArrItemCount([{
|
||||
Id = Jso.itemid,
|
||||
Count = Jso.itemcount
|
||||
Count = Jso.itemcount,
|
||||
}]);
|
||||
if (!FlagBuf) Flag = false;
|
||||
Jso.Loser <- uid;
|
||||
@@ -360,6 +531,7 @@ class ServerControl {
|
||||
local SUser = World.GetUserByUid(uid);
|
||||
local InvenObj = SUser.GetInven();
|
||||
InvenObj.DeleteItemCount(Jso.itemid, Jso.itemcount);
|
||||
SUser.SendItemSpace(0);
|
||||
}
|
||||
Jso.DeleteFlag <- true;
|
||||
} else {
|
||||
@@ -369,6 +541,136 @@ class ServerControl {
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
|
||||
//给指定玩家扣除装备 并且会返回是否成功的
|
||||
GatewaySocketPackFuncMap.rawset(20250318, function(Jso) {
|
||||
local UID = Jso.uid;
|
||||
local SUser = World.GetUserByUid(UID);
|
||||
if (SUser) {
|
||||
local InvenObj = SUser.GetInven();
|
||||
local slot = InvenObj.GetSlotById(Jso.itemId);
|
||||
|
||||
if (slot == -1) {
|
||||
Jso.DeleteFlag <- false;
|
||||
} else {
|
||||
local itemobj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, slot);
|
||||
itemobj.Delete();
|
||||
SUser.SendUpdateItemList(1, 0, slot);
|
||||
Jso.DeleteFlag <- true;
|
||||
|
||||
}
|
||||
} else {
|
||||
Jso.DeleteFlag <- false;
|
||||
}
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
|
||||
//给一个玩家 批量扣除道具
|
||||
GatewaySocketPackFuncMap.rawset(20241122, function(Jso) {
|
||||
local Flag = true;
|
||||
|
||||
local SUser = World.GetUserByUid(Jso.uid);
|
||||
local InvenObj = SUser.GetInven();
|
||||
|
||||
if (SUser) {
|
||||
//获取背包对象
|
||||
local FlagBuf = InvenObj.CheckArrItemCountRindro(Jso.ItemS);
|
||||
if (!FlagBuf) Flag = false;
|
||||
} else {
|
||||
Flag = false;
|
||||
}
|
||||
if (Flag) {
|
||||
InvenObj.DeleteArrItemCountRindro(Jso.ItemS);
|
||||
SUser.SendItemSpace(0);
|
||||
}
|
||||
|
||||
Jso.DeleteFlag <- Flag;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
|
||||
//给一个玩家 设置角色栏上限
|
||||
GatewaySocketPackFuncMap.rawset(20250227, function(Jso) {
|
||||
local Flag = true;
|
||||
|
||||
local SUser = World.GetUserByUid(Jso.uid);
|
||||
if (SUser == null) {
|
||||
SUser = WebAddressUser;
|
||||
}
|
||||
Sq_CallFunc(S_Ptr("0x0869755C"), "int", ["pointer", "int"], SUser.C_Object, Jso.num);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
//给一个玩家 设置当天交易额
|
||||
GatewaySocketPackFuncMap.rawset(20250228, function(Jso) {
|
||||
local SUser = World.GetUserByUid(Jso.uid);
|
||||
|
||||
|
||||
SUser.SetTradeGoldDaily(Jso.num);
|
||||
print(SUser.GetTradeGoldDaily());
|
||||
});
|
||||
|
||||
//设置全服交易上限
|
||||
GatewaySocketPackFuncMap.rawset(20250229, function(Jso) {
|
||||
GameManager.FixGlodTradeDaily(Jso.num);
|
||||
});
|
||||
|
||||
|
||||
|
||||
//给一个玩家 批量扣除道具 并且如果第一个道具是装备 就返回装备的强化信息
|
||||
GatewaySocketPackFuncMap.rawset(20241210, function(Jso) {
|
||||
local Flag = true;
|
||||
|
||||
local SUser = World.GetUserByUid(Jso.uid);
|
||||
local InvenObj = SUser.GetInven();
|
||||
|
||||
local ItemObj1 = InvenObj.GetSlot(1, Jso.pos);
|
||||
|
||||
if (SUser) {
|
||||
//获取背包对象
|
||||
local FlagBuf = InvenObj.CheckArrItemCountRindro(Jso.ItemS);
|
||||
if (!FlagBuf) Flag = false;
|
||||
} else {
|
||||
Flag = false;
|
||||
}
|
||||
if (Flag) {
|
||||
if (!ItemObj1.IsEmpty && ItemObj1.GetType() == "装备") {
|
||||
local forging = ItemObj1.GetForging(); //锻造
|
||||
local upgrade = ItemObj1.GetUpgrade(); //强化
|
||||
local amplification = ItemObj1.GetAmplification(); //增幅
|
||||
local enchanting = ItemObj1.GetEnchanting(); //附魔
|
||||
Jso.up <- [forging, upgrade, amplification, enchanting];
|
||||
}
|
||||
InvenObj.DeleteArrItemCountRindro(Jso.ItemS);
|
||||
SUser.SendItemSpace(0);
|
||||
}
|
||||
Jso.DeleteFlag <- Flag;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
//给指定玩家下发道具 并且如果道具是装备 就给加上强化信息
|
||||
GatewaySocketPackFuncMap.rawset(20241212, function(Jso) {
|
||||
local UID = Jso.uid;
|
||||
local CID = Jso.cid;
|
||||
local SUser = World.GetUserByUidCid(UID, CID);
|
||||
local item = SUser.GiveItem(Jso.itemId, Jso.count);
|
||||
//最后获得的道具
|
||||
local reitem = InvenObj.GetSlot(1, item[1]);
|
||||
if (reitem.GetType() == "装备") {
|
||||
reitem.SetForging(Jso.up[0]);
|
||||
reitem.SetUpgrade(Jso.up[1]);
|
||||
reitem.SetAmplification(Jso.up[2]);
|
||||
reitem.SetEnchanting(Jso.up[3]);
|
||||
reitem.Flush();
|
||||
}
|
||||
});
|
||||
|
||||
//公告包
|
||||
GatewaySocketPackFuncMap.rawset(2023082102, function(Jso) {
|
||||
World.SendNotiPacketMessage(Jso.str, Jso.type);
|
||||
@@ -379,10 +681,28 @@ class ServerControl {
|
||||
local CID = Jso.cid;
|
||||
local SUser = World.GetUserByUidCid(UID, CID);
|
||||
if (SUser) {
|
||||
SUser.SendNotiPacketMessage(Jso.str, Jso.type);
|
||||
if (Jso.type == -1) {
|
||||
SUser.SendNotiBox(Jso.str, 1);
|
||||
} else {
|
||||
SUser.SendNotiPacketMessage(Jso.str, Jso.type);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//获取玩家位置信息
|
||||
GatewaySocketPackFuncMap.rawset(20241126, function(Jso) {
|
||||
local SUser = World.GetUserByUid(Jso.uid);
|
||||
local Info = SUser.GetLocation();
|
||||
local list = [];
|
||||
list.append(Info.Town);
|
||||
list.append(Info.Area);
|
||||
list.append(Info.Pos.X);
|
||||
list.append(Info.Pos.Y);
|
||||
Jso.Location <- list;
|
||||
Jso.op = Jso.realop;
|
||||
Socket.SendGateway(Jso);
|
||||
});
|
||||
|
||||
//玩家进入副本
|
||||
Cb_History_DungeonEnter_Func["RindroGoDgn"] <- function(SUser, Data) {
|
||||
local PartyObj = SUser.GetParty();
|
||||
@@ -416,10 +736,14 @@ class ServerControl {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//给注册玩家通关副本
|
||||
GatewaySocketPackFuncMap.rawset(2023110704, function(Jso) {
|
||||
local RealOp = Jso.realop;
|
||||
print("注册副本了");
|
||||
Cb_ClearDungeon_Enter_Func[RealOp] <- function(arg) {
|
||||
print("通关副本了");
|
||||
local PartyObj = Party(arg[0]);
|
||||
if (PartyObj) {
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
@@ -477,6 +801,7 @@ class ServerControl {
|
||||
Socket.SendGateway(T);
|
||||
}
|
||||
|
||||
|
||||
//返回选择角色
|
||||
Cb_return_select_character_Func["Rindro_return_select_character"] <- function(SUser) {
|
||||
local T = {
|
||||
@@ -546,7 +871,8 @@ class ServerControl {
|
||||
return true;
|
||||
}
|
||||
|
||||
Cb_History_PCoinDown_Func["Rindro_PCoinDown"] <- function(SUser, Data) {
|
||||
Cb_UseCoin_Enter_Func["Rindro_PCoinDown"] <- function(args) {
|
||||
local SUser = User(args[1]);
|
||||
if (SUser) {
|
||||
local T = {
|
||||
op = 25001035,
|
||||
@@ -557,7 +883,6 @@ class ServerControl {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//组队HOOK包 同意加入或者同意申请
|
||||
Cb_User_Party_Agree_Func["Rindro_player_User_Party_Agree"] <- function(SUser) {
|
||||
local T = {
|
||||
@@ -715,13 +1040,31 @@ class ServerControl {
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
queId = args[1],
|
||||
op = 20069009
|
||||
op = 25001041
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 登录游戏时点击开始游戏的回调
|
||||
Cb_User_Set_WebAddress_Leave_Func.ServerControl <- function(args) {
|
||||
local SUser = User(args[0]);
|
||||
|
||||
local Jso = {
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
op = 25001043
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
WebAddressUser = SUser;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//刚登录游戏没办法从世界里找到这个角色 在这暂存下
|
||||
WebAddressUser <- null;
|
||||
|
||||
|
||||
ProjectInitFuncMap.P_ServerControl <- ServerControl();
|
||||
@@ -49,6 +49,7 @@ class Anton {
|
||||
function base_input_hook(CUser, CmdString) {
|
||||
if (!CUser) return true;
|
||||
local SUser = User(CUser);
|
||||
|
||||
//安图恩频道
|
||||
if (Sq_Game_GetConfig().find("18") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
@@ -69,6 +70,28 @@ class Anton {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function base_input_hook2(args) {
|
||||
local type = args[2];
|
||||
local SUser = User(args[1]);
|
||||
local msg = args[3];
|
||||
if ((type == 8 || type == 3) && Sq_Game_GetConfig().find("18") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
if (Localtion.Area <= 1) {
|
||||
return true;
|
||||
} else {
|
||||
local Jso = {
|
||||
op = 20064027,
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
msg = msg
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//玩家消息分发
|
||||
function PlayerNotiMsgDistribute(Jso) {
|
||||
local SUser = World.GetUserByUidCid(Jso.uid, Jso.cid);
|
||||
@@ -82,7 +105,7 @@ class Anton {
|
||||
local SUserName = SUser.GetCharacName();
|
||||
local Type = Jso.type;
|
||||
|
||||
Jso.msg = Jso.msg.slice(0, Jso.msg.len() - 11);
|
||||
Jso.msg = Jso.msg;
|
||||
if (Type == -1) {
|
||||
Jso.Name <- SUserName;
|
||||
foreach(_Index, Value in RealList) {
|
||||
@@ -211,8 +234,10 @@ class Anton {
|
||||
//注册HOOK
|
||||
Cb_Insert_User_Func.Anton <- insert_user_hook.bindenv(this); //区域添加角色
|
||||
Cb_Move_Area_Func.Anton <- move_area_hook.bindenv(this); //区域移动
|
||||
Base_InputHookFunc_Handle.Anton <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
//Base_InputHookFunc_Handle.Anton <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
Cb_reach_game_world_Func.Anton <- Login_Hook.bindenv(this); //上线HOOK
|
||||
Cb_Server_Chat_Log_Leave_Func.Anton <- base_input_hook2.bindenv(this); //玩家发送消息
|
||||
|
||||
|
||||
//注册收包
|
||||
GatewaySocketPackFuncMap.rawset(20064010, AntonSendAreaUserCallBack.bindenv(this)); //玩家移动后的区域广播包
|
||||
|
||||
@@ -8,6 +8,7 @@ class CombatRank {
|
||||
|
||||
//角色更换了装备事件包
|
||||
PacketId_0 = 20072102;
|
||||
PacketId_1 = 20072602;
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -24,6 +25,12 @@ class CombatRank {
|
||||
}
|
||||
SUser.SendJso(T);
|
||||
}.bindenv(this);
|
||||
Cb_player_chanage_equ_Func.CombatRankBFunc <- function(SUser) {
|
||||
local T = {
|
||||
op = PacketId_1
|
||||
}
|
||||
SUser.SendJso(T);
|
||||
}.bindenv(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ class EquimentUseJewel {
|
||||
//从池子拿连接
|
||||
local SqlObj = MysqlPool.GetInstance().GetConnect();
|
||||
local Ret = SqlObj.Select(CheckSql, ["int"]);
|
||||
printT(Ret);
|
||||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
//没结婚要返回false
|
||||
@@ -184,7 +183,6 @@ class EquimentUseJewel {
|
||||
function GetByte(value) {
|
||||
local Blob = blob();
|
||||
Blob.writen(value, 'w');
|
||||
print(Blob.len());
|
||||
return Blob;
|
||||
}
|
||||
|
||||
@@ -226,262 +224,358 @@ class EquimentUseJewel {
|
||||
|
||||
HackReturnAddSocketToAvatarFalg = null;
|
||||
|
||||
|
||||
function HackReturnAddSocketToAvatar(Code) {
|
||||
//通过hook get short直接返回0达到错误返回的效果
|
||||
//标记flag
|
||||
HackReturnAddSocketToAvatarFalg = Code;
|
||||
Haker.LoadHook("0x0858D0B0", ["pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
Haker.UnLoadHook("0x0858D0B0");
|
||||
return 0;
|
||||
});
|
||||
|
||||
Cb_PacketBuf_get_short_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
Cb_PacketBuf_get_short_Leave_Func.rawdelete("EquimentUseJewel");
|
||||
return 0;
|
||||
}.bindenv(this);
|
||||
}
|
||||
|
||||
|
||||
function FixFunction() {
|
||||
//称号回包
|
||||
Haker.LoadHook("0x08641A6A", ["pointer", "pointer", "int", "pointer", "int"],
|
||||
function(args) {
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
local JewelSocketData = api_get_jewel_socket_data(NativePointer(args[3]).add(25).readU32());
|
||||
local ret = args.pop();
|
||||
if (JewelSocketData && NativePointer(JewelSocketData).add(0).readU8() != 0) {
|
||||
local Pack = Packet(args[1]);
|
||||
Pack.Put_BinaryEx(JewelSocketData.C_Object, 30);
|
||||
}
|
||||
return null;
|
||||
}.bindenv(this));
|
||||
Cb_CTitleBook_putItemData_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
local JewelSocketData = api_get_jewel_socket_data(NativePointer(args[3]).add(25).readU32());
|
||||
local ret = args.pop();
|
||||
if (JewelSocketData && NativePointer(JewelSocketData).add(0).readU8() != 0) {
|
||||
local Pack = Packet(args[1]);
|
||||
Pack.Put_BinaryEx(JewelSocketData.C_Object, 30);
|
||||
}
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
//设计图继承
|
||||
Haker.LoadHook("0x08671EB2", ["pointer", "pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
local jewelSocketID = NativePointer(args[2]).add(25).readU32();
|
||||
NativePointer(args[1]).add(25).writeU32(jewelSocketID);
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
return null;
|
||||
}.bindenv(this));
|
||||
Cb_CUsercopyItemOption_Enter_Func.EquimentUseJewel <- function(args) {
|
||||
local jewelSocketID = NativePointer(args[2]).add(25).readU32();
|
||||
NativePointer(args[1]).add(25).writeU32(jewelSocketID);
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
//装备开孔
|
||||
Haker.LoadHook("0x0821A412", ["pointer", "pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
Cb_AddSocketToAvatar_Enter_Func.EquimentUseJewel <- function(args) {
|
||||
local SUser = User(args[1]);
|
||||
local Pack = Packet(args[2]);
|
||||
local equ_slot = Pack.GetShort();
|
||||
local equitem_id = Pack.GetInt();
|
||||
local sta_slot = Pack.GetShort();
|
||||
local CurCharacInvenW = SUser.GetInven();
|
||||
local inven_item = CurCharacInvenW.GetSlot(1, equ_slot);
|
||||
|
||||
if (equ_slot > 56) { //修改后:大于56则是时装装备 原:如果不是装备文件就调用原逻辑
|
||||
equ_slot = equ_slot - 57;
|
||||
local C_PacketBuf = api_PacketBuf_get_buf(args[2]) //获取原始封包数据
|
||||
C_PacketBuf.add(0).writeShort(equ_slot) //修改掉装备位置信息 时装类镶嵌从57开始。
|
||||
|
||||
//执行原逻辑
|
||||
return null;
|
||||
}
|
||||
//如果已开启镶嵌槽则不执行
|
||||
local equ_id = NativePointer(inven_item.C_Object).add(25).readU32();
|
||||
if (api_exitjeweldata(equ_id)) {
|
||||
HackReturnAddSocketToAvatar(0x13);
|
||||
return null;
|
||||
}
|
||||
|
||||
local item = PvfItem.GetPvfItemById(equitem_id);
|
||||
local ItemType = Sq_CallFunc(S_Ptr("0x08514D26"), "int", ["pointer"], item.C_Object);
|
||||
|
||||
if (ItemType == 10) {
|
||||
SUser.SendNotiBox("装备为武器类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
} else if (ItemType == 11) {
|
||||
SUser.SendNotiBox("装备为称号类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
}
|
||||
|
||||
local id = add_equiment_socket(ItemType);
|
||||
|
||||
Sq_Inven_RemoveItemFormCount(CurCharacInvenW.C_Object, 1, sta_slot, 1, 8, 1); //删除打孔道具
|
||||
NativePointer(inven_item.C_Object).add(25).writeU32(id) //写入槽位标识
|
||||
SUser.SendUpdateItemList(1, 0, equ_slot);
|
||||
|
||||
local JewelSocketData = api_get_jewel_socket_data(id);
|
||||
CUser_SendUpdateItemList_DB(SUser, equ_slot, JewelSocketData); //用于更新镶嵌后的装备显示,这里用的是带镶嵌数据的更新背包函数,并非CUser_SendUpdateItemList
|
||||
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(1, 209);
|
||||
Pack.Put_Byte(1);
|
||||
Pack.Put_Short(equ_slot + 104);
|
||||
Pack.Put_Short(sta_slot);
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
Cb_AddSocketToAvatar_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
|
||||
local Pack = Packet(args[2]);
|
||||
local equ_slot = Pack.GetShort();
|
||||
print(equ_slot);
|
||||
//跳的错误返回0 正常调用的话不处理返回值
|
||||
if (HackReturnAddSocketToAvatarFalg != null) {
|
||||
local SUser = User(args[1]);
|
||||
local Pack = Packet(args[2]);
|
||||
local equ_slot = Pack.GetShort();
|
||||
local equitem_id = Pack.GetInt();
|
||||
local sta_slot = Pack.GetShort();
|
||||
local CurCharacInvenW = SUser.GetInven();
|
||||
local inven_item = CurCharacInvenW.GetSlot(1, equ_slot);
|
||||
// SUser.SendItemSpace(0);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, HackReturnAddSocketToAvatarFalg);
|
||||
HackReturnAddSocketToAvatarFalg = null;
|
||||
return 0;
|
||||
}
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
if (equ_slot > 56) { //修改后:大于56则是时装装备 原:如果不是装备文件就调用原逻辑
|
||||
equ_slot = equ_slot - 57;
|
||||
local C_PacketBuf = api_PacketBuf_get_buf(args[2]) //获取原始封包数据
|
||||
C_PacketBuf.add(0).writeShort(equ_slot) //修改掉装备位置信息 时装类镶嵌从57开始。
|
||||
//执行原逻辑
|
||||
return null;
|
||||
}
|
||||
//如果已开启镶嵌槽则不执行
|
||||
local equ_id = NativePointer(inven_item.C_Object).add(25).readU32();
|
||||
if (api_exitjeweldata(equ_id)) {
|
||||
HackReturnAddSocketToAvatar(0x13);
|
||||
return null;
|
||||
}
|
||||
//装备镶嵌和时装镶嵌
|
||||
Cb_Dispatcher_UseJewel_Enter_Func.EquimentUseJewel <- function(args) {
|
||||
local SUser = User(args[1]);
|
||||
local Pack = Packet(args[2]);
|
||||
local PackIndex = NativePointer(args[2]).add(4).readInt();
|
||||
local State = SUser.GetState();
|
||||
if (State != 3) return null;
|
||||
|
||||
local item = PvfItem.GetPvfItemById(equitem_id);
|
||||
local ItemType = Sq_CallFunc(S_Ptr("0x08514D26"), "int", ["pointer"], item.C_Object);
|
||||
local avartar_inven_slot = Pack.GetShort();
|
||||
local avartar_item_id = Pack.GetInt();
|
||||
local emblem_cnt = Pack.GetByte();
|
||||
|
||||
if (ItemType == 10) {
|
||||
SUser.SendNotiBox("装备为武器类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
} else if (ItemType == 11) {
|
||||
SUser.SendNotiBox("装备为称号类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
local id = add_equiment_socket(ItemType);
|
||||
Sq_Inven_RemoveItemFormCount(CurCharacInvenW.C_Object, 1, sta_slot, 1, 8, 1); //删除打孔道具
|
||||
NativePointer(inven_item.C_Object).add(25).writeU32(id) //写入槽位标识
|
||||
SUser.SendUpdateItemList(1, 0, equ_slot);
|
||||
//下面是参照原时装镶嵌的思路写的。个别点标记出来。
|
||||
if (avartar_inven_slot > 104) {
|
||||
local equipment_inven_slot = avartar_inven_slot - 104; //取出真实装备所在背包位置值
|
||||
local Inven = SUser.GetInven();
|
||||
local equipment = Inven.GetSlot(1, equipment_inven_slot);
|
||||
//校验是否合法
|
||||
if (!equipment || equipment.IsEmpty || (equipment.GetIndex() != avartar_item_id) || SUser.CheckItemLock(1, equipment_inven_slot)) return;
|
||||
|
||||
local id = NativePointer(equipment.C_Object).add(25).readU32();
|
||||
local JewelSocketData = api_get_jewel_socket_data(id);
|
||||
CUser_SendUpdateItemList_DB(SUser, equ_slot, JewelSocketData); //用于更新镶嵌后的装备显示,这里用的是带镶嵌数据的更新背包函数,并非CUser_SendUpdateItemList
|
||||
if (!JewelSocketData) return;
|
||||
|
||||
local emblems = {};
|
||||
if (emblem_cnt <= 3) {
|
||||
for (local i = 0; i< emblem_cnt; i++) {
|
||||
local emblem_inven_slot = Pack.GetShort();
|
||||
local emblem_item_id = Pack.GetInt();
|
||||
local equipment_socket_slot = Pack.GetByte();
|
||||
local emblem = Inven.GetSlot(1, emblem_inven_slot);
|
||||
//校验徽章及插槽数据是否合法
|
||||
if (!emblem || emblem.IsEmpty || (emblem.GetIndex() != emblem_item_id) || (equipment_socket_slot >= 3)) return;
|
||||
|
||||
//校验徽章是否满足时装插槽颜色要求
|
||||
//获取徽章pvf数据
|
||||
local citem = PvfItem.GetPvfItemById(emblem_item_id);
|
||||
if (!citem) return;
|
||||
|
||||
//校验徽章类型
|
||||
if (!citem.IsStackable() || citem.GetItemType() != 20) return;
|
||||
|
||||
//获取徽章支持的插槽
|
||||
local emblem_socket_type = CStackableItem_getJewelTargetSocket(citem.C_Object);
|
||||
//获取要镶嵌的时装插槽类型
|
||||
local avartar_socket_type = JewelSocketData.add(equipment_socket_slot * 6).readShort();
|
||||
|
||||
if (!(emblem_socket_type & avartar_socket_type)) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
emblems[equipment_socket_slot] <- [emblem_inven_slot, emblem_item_id];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach(equipment_socket_slot, emblemObject in emblems) {
|
||||
//删除徽章
|
||||
local emblem_inven_slot = emblemObject[0];
|
||||
Sq_Inven_RemoveItemFormCount(Inven.C_Object, 1, emblem_inven_slot, 1, 8, 1); //删除打孔道具
|
||||
//设置时装插槽数据
|
||||
local emblem_item_id = emblemObject[1];
|
||||
JewelSocketData.add(2 + 6 * equipment_socket_slot).writeU32(emblem_item_id);
|
||||
}
|
||||
|
||||
local Buf = Sq_Point2Blob(JewelSocketData.C_Object, 30);
|
||||
local Str = "";
|
||||
foreach(Value in Buf) {
|
||||
Str += format("%02X", Value);
|
||||
}
|
||||
|
||||
save_equiment_socket(Str, id);
|
||||
// if (!save_equiment_socket(DB_JewelSocketData, id)) {
|
||||
// print("写入失败了");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
CUser_SendUpdateItemList_DB(SUser, equipment_inven_slot, JewelSocketData); //用于更新镶嵌后的装备显示,这里用的是带镶嵌数据的更新背包函数,并非CUser_SendUpdateItemList
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(1, 209);
|
||||
Pack.Put_Byte(1);
|
||||
Pack.Put_Short(equ_slot + 104);
|
||||
Pack.Put_Short(sta_slot);
|
||||
Pack.Put_Short(equipment_inven_slot + 104);
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
//跳的错误返回0 正常调用的话不处理返回值
|
||||
if (HackReturnAddSocketToAvatarFalg != null) {
|
||||
local SUser = User(args[1]);
|
||||
// SUser.SendItemSpace(0);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, HackReturnAddSocketToAvatarFalg);
|
||||
HackReturnAddSocketToAvatarFalg = null;
|
||||
return 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
return null;
|
||||
}.bindenv(this));
|
||||
AvatarLogic(args, PackIndex);
|
||||
|
||||
//装备镶嵌和时装镶嵌
|
||||
Haker.LoadHook("0x8217BD6", ["int", "pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
local SUser = User(args[1]);
|
||||
local Pack = Packet(args[2]);
|
||||
local State = SUser.GetState();
|
||||
if (State != 3) return null;
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
local avartar_inven_slot = Pack.GetShort();
|
||||
local avartar_item_id = Pack.GetInt();
|
||||
local emblem_cnt = Pack.GetByte();
|
||||
|
||||
//下面是参照原时装镶嵌的思路写的。个别点标记出来。
|
||||
if (avartar_inven_slot > 104) {
|
||||
local equipment_inven_slot = avartar_inven_slot - 104; //取出真实装备所在背包位置值
|
||||
local Inven = SUser.GetInven();
|
||||
local equipment = Inven.GetSlot(1, equipment_inven_slot);
|
||||
//校验是否合法
|
||||
if (!equipment || equipment.IsEmpty || (equipment.GetIndex() != avartar_item_id) || SUser.CheckItemLock(1, equipment_inven_slot)) return;
|
||||
|
||||
local id = NativePointer(equipment.C_Object).add(25).readU32();
|
||||
local JewelSocketData = api_get_jewel_socket_data(id);
|
||||
if (!JewelSocketData) return;
|
||||
|
||||
local emblems = {};
|
||||
if (emblem_cnt <= 3) {
|
||||
for (local i = 0; i< emblem_cnt; i++) {
|
||||
local emblem_inven_slot = Pack.GetShort();
|
||||
local emblem_item_id = Pack.GetInt();
|
||||
local equipment_socket_slot = Pack.GetByte();
|
||||
local emblem = Inven.GetSlot(1, emblem_inven_slot);
|
||||
//校验徽章及插槽数据是否合法
|
||||
if (!emblem || emblem.IsEmpty || (emblem.GetIndex() != emblem_item_id) || (equipment_socket_slot >= 3)) return;
|
||||
|
||||
//校验徽章是否满足时装插槽颜色要求
|
||||
//获取徽章pvf数据
|
||||
local citem = PvfItem.GetPvfItemById(emblem_item_id);
|
||||
if (!citem) return;
|
||||
|
||||
//校验徽章类型
|
||||
if (!citem.IsStackable() || citem.GetItemType() != 20) return;
|
||||
|
||||
//获取徽章支持的插槽
|
||||
local emblem_socket_type = CStackableItem_getJewelTargetSocket(citem.C_Object);
|
||||
//获取要镶嵌的时装插槽类型
|
||||
local avartar_socket_type = JewelSocketData.add(equipment_socket_slot * 6).readShort();
|
||||
|
||||
if (!(emblem_socket_type & avartar_socket_type)) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
emblems[equipment_socket_slot] <- [emblem_inven_slot, emblem_item_id];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach(equipment_socket_slot, emblemObject in emblems) {
|
||||
//删除徽章
|
||||
local emblem_inven_slot = emblemObject[0];
|
||||
Sq_Inven_RemoveItemFormCount(Inven.C_Object, 1, emblem_inven_slot, 1, 8, 1); //删除打孔道具
|
||||
//设置时装插槽数据
|
||||
local emblem_item_id = emblemObject[1];
|
||||
JewelSocketData.add(2 + 6 * equipment_socket_slot).writeU32(emblem_item_id);
|
||||
}
|
||||
|
||||
local Buf = Sq_Point2Blob(JewelSocketData.C_Object, 30);
|
||||
local Str = "";
|
||||
foreach(Value in Buf) {
|
||||
Str += format("%02X", Value);
|
||||
}
|
||||
|
||||
save_equiment_socket(Str, id);
|
||||
// if (!save_equiment_socket(DB_JewelSocketData, id)) {
|
||||
// print("写入失败了");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
CUser_SendUpdateItemList_DB(SUser, equipment_inven_slot, JewelSocketData); //用于更新镶嵌后的装备显示,这里用的是带镶嵌数据的更新背包函数,并非CUser_SendUpdateItemList
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(1, 209);
|
||||
Pack.Put_Byte(1);
|
||||
Pack.Put_Short(equipment_inven_slot + 104);
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
return 0;
|
||||
}.bindenv(this));
|
||||
Cb_Dispatcher_UseJewel_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
return -1;
|
||||
}.bindenv(this);
|
||||
|
||||
//额外数据包,发送装备镶嵌数据给本地处理
|
||||
Haker.LoadHook("0x0815098e", ["pointer", "pointer", "int"],
|
||||
function(args) {
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
local ret = args.pop();
|
||||
local Inven_Item = NativePointer(args[1]);
|
||||
if (Inven_Item.add(1).readU8() == 1) {
|
||||
local ItemObj = Item(args[1]);
|
||||
local JewelSocketData = api_get_jewel_socket_data(NativePointer(ItemObj.C_Object).add(25).readU32());
|
||||
if (JewelSocketData && JewelSocketData.add(0).readU8() != 0) {
|
||||
local Pack = Packet(args[0]);
|
||||
Pack.Put_BinaryEx(JewelSocketData.C_Object, 30);
|
||||
}
|
||||
Cb_InterfacePacketBuf_put_packet_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
local ret = args.pop();
|
||||
local Inven_Item = NativePointer(args[1]);
|
||||
if (Inven_Item.add(1).readU8() == 1) {
|
||||
local ItemObj = Item(args[1]);
|
||||
local JewelSocketData = api_get_jewel_socket_data(NativePointer(ItemObj.C_Object).add(25).readU32());
|
||||
if (JewelSocketData && JewelSocketData.add(0).readU8() != 0) {
|
||||
local Pack = Packet(args[0]);
|
||||
Pack.Put_BinaryEx(JewelSocketData.C_Object, 30);
|
||||
}
|
||||
return null;
|
||||
}.bindenv(this));
|
||||
}
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
//装备全字节复制
|
||||
Haker.LoadHook("0x0814A62E", ["pointer", "pointer", "pointer"],
|
||||
function(args) {
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
L_HookEquimentUseJewel();
|
||||
}
|
||||
|
||||
function(args) {
|
||||
local Old = NativePointer(args[1]);
|
||||
local New = NativePointer(args[0]);
|
||||
Memory.copy(New, Old, 61);
|
||||
return args[0];
|
||||
}.bindenv(this));
|
||||
|
||||
//装备全字节删除
|
||||
Haker.LoadHook("0x080CB7D8", ["pointer", "int"],
|
||||
function(args) {
|
||||
return null;
|
||||
}.bindenv(this),
|
||||
|
||||
function(args) {
|
||||
local New = NativePointer(args[0]);
|
||||
Memory.reset(New, 61);
|
||||
return null;
|
||||
}.bindenv(this));
|
||||
|
||||
function WongWork_CAvatarItemMgr_getJewelSocketData(a, b) {
|
||||
return Sq_CallFunc(S_Ptr("0x82F98F8"), "pointer", ["pointer", "int"], a, b);
|
||||
}
|
||||
|
||||
function CStackableItem_getJewelTargetSocket(C_Object) {
|
||||
return Sq_CallFunc(S_Ptr("0x0822CA28"), "int", ["pointer"], C_Object);
|
||||
}
|
||||
|
||||
function CInventory_delete_item(C_Object, Type, Slot, Count, Ps, Log) {
|
||||
return Sq_CallFunc(S_Ptr("0x850400C"), "int", ["pointer", "int", "int", "int", "int", "int"], C_Object, Type, Slot, Count, Ps, Log);
|
||||
}
|
||||
|
||||
function api_set_JewelSocketData(jewelSocketData, slot, emblem_item_id) {
|
||||
if (jewelSocketData) {
|
||||
NativePointer(jewelSocketData).add(slot * 6 + 2).writeInt(emblem_item_id);
|
||||
}
|
||||
}
|
||||
|
||||
function DB_UpdateAvatarJewelSlot_makeRequest(a, b, c) {
|
||||
return Sq_CallFunc(S_Ptr("0x843081C"), "pointer", ["int", "int", "pointer"], a, b, c);
|
||||
}
|
||||
|
||||
//获取时装在数据库中的uid
|
||||
function api_get_avartar_ui_id(avartar) {
|
||||
return NativePointer(avartar).add(7).readInt();
|
||||
}
|
||||
|
||||
|
||||
function AvatarLogic(args, PackIndex) {
|
||||
//角色
|
||||
local SUser = User(args[1]);
|
||||
//包数据
|
||||
local Pack = Packet(args[2]);
|
||||
//还原包读取数据号位
|
||||
NativePointer(args[2]).add(4).writeInt(PackIndex);
|
||||
|
||||
//校验角色状态是否允许镶嵌
|
||||
if (!SUser || SUser.GetState() != 3) {
|
||||
return;
|
||||
}
|
||||
//时装所在的背包槽
|
||||
local Inven_Slot = Pack.GetShort();
|
||||
//时装item_id
|
||||
local Item_Id = Pack.GetInt();
|
||||
//本次镶嵌徽章数量
|
||||
local Emblem_Count = Pack.GetByte();
|
||||
|
||||
//获取时装道具
|
||||
local InvemObj = SUser.GetInven();
|
||||
local AvatarObj = InvemObj.GetSlot(2, Inven_Slot);
|
||||
|
||||
|
||||
//校验时装 数据是否合法
|
||||
if (!AvatarObj || AvatarObj.IsEmpty || (AvatarObj.GetIndex() != Item_Id) || SUser.CheckItemLock(2, Inven_Slot)) return;
|
||||
|
||||
local Avartar_AddInfo = AvatarObj.GetAdd_Info();
|
||||
//获取时装管理器
|
||||
local Inven_AvartarMgr = InvemObj.GetAvatarItemMgr();
|
||||
|
||||
//获取时装插槽数据
|
||||
local Jewel_Socket_Data = WongWork_CAvatarItemMgr_getJewelSocketData(Inven_AvartarMgr, Avartar_AddInfo);
|
||||
if (!Jewel_Socket_Data) return;
|
||||
|
||||
//最多只支持3个插槽
|
||||
if (Emblem_Count <= 3) {
|
||||
local emblems = {};
|
||||
|
||||
for (local i = 0; i< Emblem_Count; i++) {
|
||||
//徽章所在的背包槽
|
||||
local emblem_inven_slot = Pack.GetShort();
|
||||
//徽章item_id
|
||||
local emblem_item_id = Pack.GetInt();
|
||||
//该徽章镶嵌的时装插槽id
|
||||
local avartar_socket_slot = Pack.GetByte();
|
||||
|
||||
//获取徽章道具
|
||||
local EmblemObje = InvemObj.GetSlot(1, emblem_inven_slot);
|
||||
|
||||
//校验徽章及插槽数据是否合法
|
||||
if (!EmblemObje || EmblemObje.IsEmpty || (EmblemObje.GetIndex() != emblem_item_id) || (avartar_socket_slot >= 3)) return;
|
||||
|
||||
//校验徽章是否满足时装插槽颜色要求
|
||||
//获取徽章pvf数据
|
||||
local citem = PvfItem.GetPvfItemById(emblem_item_id);
|
||||
if (!citem) return;
|
||||
|
||||
//校验徽章类型
|
||||
if (!citem.IsStackable() || citem.GetItemType() != 20) return;
|
||||
|
||||
//获取徽章支持的插槽
|
||||
local emblem_socket_type = CStackableItem_getJewelTargetSocket(citem.C_Object);
|
||||
|
||||
//获取要镶嵌的时装插槽类型
|
||||
local avartar_socket_type = NativePointer(Jewel_Socket_Data).add(avartar_socket_slot * 6).readShort();
|
||||
|
||||
if (!(emblem_socket_type & avartar_socket_type)) return;
|
||||
|
||||
emblems[avartar_socket_slot] <- [emblem_inven_slot, emblem_item_id];
|
||||
}
|
||||
|
||||
//开始镶嵌
|
||||
foreach(avartar_socket_slot, emblemObject in emblems) {
|
||||
//删除徽章
|
||||
local emblem_inven_slot = emblemObject[0];
|
||||
CInventory_delete_item(InvemObj.C_Object, 1, emblem_inven_slot, 1, 8, 1);
|
||||
//设置时装插槽数据
|
||||
local emblem_item_id = emblemObject[1];
|
||||
api_set_JewelSocketData(Jewel_Socket_Data, avartar_socket_slot, emblem_item_id);
|
||||
}
|
||||
|
||||
//时装插槽数据存档
|
||||
DB_UpdateAvatarJewelSlot_makeRequest(SUser.GetCID(), api_get_avartar_ui_id(AvatarObj.C_Object), Jewel_Socket_Data);
|
||||
|
||||
//通知客户端时装数据已更新
|
||||
SUser.SendUpdateItemList(1, 1, Inven_Slot);
|
||||
|
||||
//回包给客户端
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(1, 204);
|
||||
Pack.Put_Int(1);
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
constructor() {
|
||||
@@ -489,8 +583,4 @@ class EquimentUseJewel {
|
||||
|
||||
FixFunction();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
getroottable().RRR <- EquimentUseJewel();
|
||||
}
|
||||
@@ -72,6 +72,27 @@ class Fiendwar {
|
||||
}
|
||||
}
|
||||
|
||||
function base_input_hook2(args) {
|
||||
local type = args[2];
|
||||
local SUser = User(args[1]);
|
||||
local msg = args[3];
|
||||
if ((type == 8 || type == 3) && Sq_Game_GetConfig().find("20") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
if (Localtion.Area <= 1) {
|
||||
return true;
|
||||
} else {
|
||||
local Jso = {
|
||||
op = 20063027,
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
msg = msg
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//玩家消息分发
|
||||
function PlayerNotiMsgDistribute(Jso) {
|
||||
local SUser = World.GetUserByUidCid(Jso.uid, Jso.cid);
|
||||
@@ -85,21 +106,22 @@ class Fiendwar {
|
||||
local SUserName = SUser.GetCharacName();
|
||||
local Type = Jso.type;
|
||||
|
||||
Jso.msg = Jso.msg;
|
||||
if (Type == -1) {
|
||||
Jso.Name <- SUserName;
|
||||
foreach(_Index, Value in RealList) {
|
||||
local SendObj = Value;
|
||||
SendObj.SendJso(Jso);
|
||||
}
|
||||
} else {
|
||||
local NotiStr = "(" + Type + ") " + "" + SUserName + " : " + Jso.msg;
|
||||
foreach(_Index, Value in RealList) {
|
||||
local SendObj = Value;
|
||||
SendObj.SendNotiPacketMessage(NotiStr, 8);
|
||||
}
|
||||
Type = "长"
|
||||
}
|
||||
local NotiStr = "(攻坚队" + Type + ") " + "" + SUserName + " : " + Jso.msg;
|
||||
foreach(_Index, Value in RealList) {
|
||||
local SendObj = Value;
|
||||
SendObj.SendNotiPacketMessage(NotiStr, 8);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function FiendwarSendAreaUserCallBack(Jso) {
|
||||
local CUserList = Jso.list;
|
||||
|
||||
@@ -49,6 +49,7 @@ class Luke {
|
||||
function base_input_hook(CUser, CmdString) {
|
||||
if (!CUser) return true;
|
||||
local SUser = User(CUser);
|
||||
print(111);
|
||||
//卢克频道
|
||||
if (Sq_Game_GetConfig().find("19") != null) {
|
||||
local Localtion = SUser.GetLocation();
|
||||
@@ -69,6 +70,29 @@ class Luke {
|
||||
}
|
||||
}
|
||||
|
||||
function base_input_hook2(args) {
|
||||
local type = args[2];
|
||||
local SUser = User(args[1]);
|
||||
local msg = args[3];
|
||||
|
||||
if ((type == 8 || type == 3) && Sq_Game_GetConfig().find("19") != null) {
|
||||
|
||||
local Localtion = SUser.GetLocation();
|
||||
if (Localtion.Area <= 1) {
|
||||
return true;
|
||||
} else {
|
||||
local Jso = {
|
||||
op = 20084027,
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
msg = msg
|
||||
}
|
||||
Socket.SendGateway(Jso);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//玩家消息分发
|
||||
function PlayerNotiMsgDistribute(Jso) {
|
||||
local SUser = World.GetUserByUidCid(Jso.uid, Jso.cid);
|
||||
@@ -82,7 +106,7 @@ class Luke {
|
||||
local SUserName = SUser.GetCharacName();
|
||||
local Type = Jso.type;
|
||||
|
||||
Jso.msg = Jso.msg.slice(0, Jso.msg.len() - 11);
|
||||
Jso.msg = Jso.msg;
|
||||
if (Type == -1) {
|
||||
Jso.Name <- SUserName;
|
||||
foreach(_Index, Value in RealList) {
|
||||
@@ -183,13 +207,15 @@ class Luke {
|
||||
|
||||
//玩家上线
|
||||
function Login_Hook(SUser) {
|
||||
//玩家上线发信息包
|
||||
local evv = {
|
||||
op = 20084502,
|
||||
town_index = Town,
|
||||
channel_index = Channel
|
||||
}
|
||||
SUser.SendJso(evv);
|
||||
Timer.SetTimeOut(function(SUser) {
|
||||
//玩家上线发信息包
|
||||
local evv = {
|
||||
op = 20084502,
|
||||
town_index = Town,
|
||||
channel_index = Channel
|
||||
}
|
||||
SUser.SendJso(evv);
|
||||
}.bindenv(this), 5, SUser);
|
||||
|
||||
local T = {
|
||||
op = 20084063,
|
||||
@@ -211,8 +237,9 @@ class Luke {
|
||||
//注册HOOK
|
||||
Cb_Insert_User_Func.Luke <- insert_user_hook.bindenv(this); //区域添加角色
|
||||
Cb_Move_Area_Func.Luke <- move_area_hook.bindenv(this); //区域移动
|
||||
Base_InputHookFunc_Handle.Luke <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
//Base_InputHookFunc_Handle.Luke <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
Cb_reach_game_world_Func.Luke <- Login_Hook.bindenv(this); //上线HOOK
|
||||
Cb_Server_Chat_Log_Leave_Func.Luke <- base_input_hook2.bindenv(this); //玩家发送消息
|
||||
|
||||
//注册收包
|
||||
GatewaySocketPackFuncMap.rawset(20084010, LukeSendAreaUserCallBack.bindenv(this)); //玩家移动后的区域广播包
|
||||
|
||||
@@ -6,94 +6,7 @@
|
||||
*/
|
||||
|
||||
|
||||
class defaultJobItemId {
|
||||
|
||||
/**
|
||||
* 头发
|
||||
*/
|
||||
hat = 0;
|
||||
|
||||
/**
|
||||
* 帽子
|
||||
*/
|
||||
hair = 0;
|
||||
|
||||
/**
|
||||
*脸
|
||||
*/
|
||||
face = 0;
|
||||
/**
|
||||
* 披风
|
||||
*/
|
||||
breast = 0;
|
||||
/**
|
||||
* 上衣
|
||||
*/
|
||||
coat = 0;
|
||||
|
||||
/**
|
||||
* 下装
|
||||
*/
|
||||
pants = 0;
|
||||
|
||||
/**
|
||||
* 腰部
|
||||
*/
|
||||
waist = 0;
|
||||
|
||||
/**
|
||||
* 鞋子
|
||||
*/
|
||||
shoes = 0;
|
||||
|
||||
/**
|
||||
* 皮肤
|
||||
*/
|
||||
skin = 0;
|
||||
|
||||
index = null;
|
||||
|
||||
constructor(hat, hair, face, breast, coat, pants, waist, shoes, skin) {
|
||||
index = [];
|
||||
this.hat = hat;
|
||||
this.hair = hair;
|
||||
this.face = face;
|
||||
this.breast = breast;
|
||||
this.coat = coat;
|
||||
this.pants = pants;
|
||||
this.waist = waist;
|
||||
this.shoes = shoes;
|
||||
this.skin = skin;
|
||||
|
||||
index.push(hat);
|
||||
index.push(hair);
|
||||
index.push(face);
|
||||
index.push(breast);
|
||||
index.push(coat);
|
||||
index.push(pants);
|
||||
index.push(waist);
|
||||
index.push(shoes);
|
||||
index.push(skin);
|
||||
index.push(0);
|
||||
index.push(0);
|
||||
}
|
||||
}
|
||||
//默认时装
|
||||
if (!(getroottable().rawin("defaultJobItemIdMap"))) {
|
||||
getroottable().defaultJobItemIdMap <- {};
|
||||
defaultJobItemIdMap.rawset(0, defaultJobItemId(39278, 39400, 0, 0, 40600, 41000, 0, 41800, 42200));
|
||||
defaultJobItemIdMap.rawset(1, defaultJobItemId(0, 43400, 0, 0, 44600, 45000, 0, 45800, 46200));
|
||||
defaultJobItemIdMap.rawset(2, defaultJobItemId(0, 47400, 0, 48426, 48600, 49000, 0, 49800, 50200));
|
||||
defaultJobItemIdMap.rawset(3, defaultJobItemId(51265, 51400, 0, 0, 52600, 53000, 0, 53800, 54200));
|
||||
defaultJobItemIdMap.rawset(4, defaultJobItemId(0, 55400, 55820, 0, 56600, 57000, 0, 57800, 58200));
|
||||
|
||||
defaultJobItemIdMap.rawset(5, defaultJobItemId(1600000, 1610000, 0, 0, 1640000, 1650000, 0, 1670000, 1680000));
|
||||
defaultJobItemIdMap.rawset(6, defaultJobItemId(1720000, 1730000, 0, 1750000, 1760000, 1770000, 0, 1790000, 1800000));
|
||||
defaultJobItemIdMap.rawset(7, defaultJobItemId(0, 29201, 0, 0, 29202, 29203, 0, 29204, 29205));
|
||||
defaultJobItemIdMap.rawset(8, defaultJobItemId(0, 2090000, 0, 0, 2120000, 2130000, 0, 2140000, 2150000));
|
||||
defaultJobItemIdMap.rawset(9, defaultJobItemId(39278, 39400, 0, 0, 40600, 41000, 0, 41800, 42200));
|
||||
defaultJobItemIdMap.rawset(10, defaultJobItemId(51265, 51400, 0, 0, 52600, 53000, 0, 53800, 54200));
|
||||
}
|
||||
|
||||
|
||||
class Marry {
|
||||
@@ -307,44 +220,26 @@ class Marry {
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//获取角色身上的显示时装
|
||||
function GetAva(SUser) {
|
||||
//获取背包对象
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (!InvenObj) return;
|
||||
local re = [];
|
||||
local job = SUser.GetCharacJob();
|
||||
|
||||
//遍历身上的每一件装备
|
||||
for (local u = 0; u <= 2; u++) {
|
||||
local EquObj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_BODY, u);
|
||||
if (EquObj && !EquObj.IsEmpty) {
|
||||
//先拿克隆id 如果这个值有 那说明带的克隆这个是被克隆的装备 直接用这个 但是如果这个人什么都没带 只带了克隆 会显示克隆的id 所以还得判断这个id是不是克隆时装
|
||||
local clearId = Sq_CallFunc(S_Ptr("0x850d374"), "int", ["pointer", "int"], InvenObj.C_Object, u)
|
||||
|
||||
|
||||
local EquObjId = EquObj.GetIndex();
|
||||
//如果这个是克隆
|
||||
if (clearId > 0) {
|
||||
re.push(clearId);
|
||||
} else { //不是克隆 直接把id放上去
|
||||
re.push(EquObjId);
|
||||
}
|
||||
} else { //如果这个部位没东西 直接放默认时装上去
|
||||
re.push(defaultJobItemIdMap[job].index[u]);
|
||||
//根据cid查询自己的uid
|
||||
GetUidByCid = function(cid) {
|
||||
local Sql = format(MARRY_SQL_LIST.GetUidByCid, cid);
|
||||
//从池子拿连接
|
||||
local SqlObj = MysqlPool.GetInstance().GetConnect();
|
||||
local Ret = SqlObj.Select(Sql, ["int"]);
|
||||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
if (Ret.len()< 1 || Ret[0][0] == null) {
|
||||
return null;
|
||||
} else {
|
||||
return Ret[0][0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return re;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查看是否结婚包
|
||||
function CheckMarryStateCallBack(SUser, Jso) {
|
||||
local T = {
|
||||
@@ -530,7 +425,10 @@ class Marry {
|
||||
infore.rawset("name", SUser.GetCharacName());
|
||||
infore.rawset("uid", SUser.GetUID());
|
||||
|
||||
local Muser = World.GetUserByUid(Target_CId);
|
||||
//根据cid去查uid
|
||||
local Target_Uid = Mysql_Operate_Func.GetUidByCid(Target_CId);
|
||||
|
||||
local Muser = World.GetUserByUid(Target_Uid);
|
||||
local infore2 = {};
|
||||
infore2.rawset("job", Muser.GetCharacJob());
|
||||
infore2.rawset("growjob", Muser.GetCharacGrowType());
|
||||
@@ -613,7 +511,7 @@ class Marry {
|
||||
local infore = {
|
||||
job = user.GetCharacJob(),
|
||||
growjob = user.GetCharacGrowType(),
|
||||
avatar = GetAva(user),
|
||||
avatar = user.GetAva(),
|
||||
name = user.GetCharacName(),
|
||||
};
|
||||
info.push(infore);
|
||||
@@ -686,7 +584,7 @@ class Marry {
|
||||
local infore = {};
|
||||
infore.rawset("job", SUser.GetCharacJob());
|
||||
infore.rawset("growjob", SUser.GetCharacGrowType());
|
||||
infore.rawset("avatar", GetAva(SUser));
|
||||
infore.rawset("avatar", SUser.GetAva());
|
||||
infore.rawset("name", SUser.GetCharacName());
|
||||
|
||||
|
||||
@@ -720,7 +618,6 @@ class Marry {
|
||||
if (SUser.GetLocation().Area == Config["礼堂区域编号"]) Sq_WriteAddress(C_Area, 0x68, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -850,22 +747,23 @@ class Marry {
|
||||
Channel = ConfigPath.slice(-6).slice(0, 2);
|
||||
|
||||
//注册来自客户端的收包
|
||||
ClientSocketPackFuncMap.rawset(OP + 9, CheckMarryStateCallBack.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 3, RequestMarry.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 5, ResponseMarry.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 7, CancelMarry.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 11, OpenPreparationWindow.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 13, ConfirmMarry.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 15, EnterAuditorium.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 17, LeaveAuditorium.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 19, GetAuditoriumList.bindenv(this));
|
||||
ClientSocketPackFuncMap.rawset(OP + 777, GetConfig.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 9, CheckMarryStateCallBack.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 3, RequestMarry.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 5, ResponseMarry.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 7, CancelMarry.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 11, OpenPreparationWindow.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 13, ConfirmMarry.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 15, EnterAuditorium.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 17, LeaveAuditorium.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 19, GetAuditoriumList.bindenv(this));
|
||||
// ClientSocketPackFuncMap.rawset(OP + 777, GetConfig.bindenv(this));
|
||||
//注册结婚回调函数
|
||||
Cb_Insert_User_Func.Marry <- Marry_insert_user_hook.bindenv(this); //区域添加角色
|
||||
|
||||
//玩家重新上线的时候自动给他退出礼堂
|
||||
// //玩家重新上线的时候自动给他退出礼堂
|
||||
Cb_reach_game_world_Func.Auditorium <- function(SUser) {
|
||||
if (EnterAuditoriumPosList.rawin(SUser.GetUID())) {
|
||||
|
||||
if (EnterAuditoriumPosList && EnterAuditoriumPosList.rawin(SUser.GetUID())) {
|
||||
local Info = EnterAuditoriumPosList[SUser.GetCID()];
|
||||
//给这个礼堂的人发送退出可见列表的包
|
||||
foreach(cid in AuditoriumUserInfo[Info["所在礼堂编号"]]) {
|
||||
@@ -878,6 +776,7 @@ class Marry {
|
||||
}.bindenv(this);
|
||||
|
||||
|
||||
|
||||
//从池子拿连接
|
||||
local SqlObj = MysqlPool.GetInstance().GetConnect();
|
||||
local query = "SELECT COUNT(*) AS table_exists FROM information_schema.tables WHERE table_schema = 'zyk' AND table_name = 'marry';"
|
||||
@@ -892,29 +791,34 @@ class Marry {
|
||||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
|
||||
|
||||
Cb_Use_Item_Sp_Func[Config["结婚等级1道具ID"]] <- function(SUser, ItemId) {
|
||||
ExpUp(SUser, Config["道具1给的心意点"]);
|
||||
}.bindenv(this);
|
||||
Cb_Use_Item_Sp_Func[Config["结婚等级2道具ID"]] <- function(SUser, ItemId) {
|
||||
ExpUp(SUser, Config["道具2给的心意点"]);
|
||||
}.bindenv(this);
|
||||
Cb_Use_Item_Sp_Func[Config["结婚等级3道具ID"]] <- function(SUser, ItemId) {
|
||||
ExpUp(SUser, Config["道具3给的心意点"]);
|
||||
}.bindenv(this);
|
||||
|
||||
}
|
||||
|
||||
function ExpUp(SUser, expUp) {
|
||||
exp = Mysql_Operate_Func.GetExpById(SUser.GetCID())
|
||||
if (!exp) {
|
||||
return;
|
||||
}
|
||||
exp = exp + expUp;
|
||||
for (local i = 6; i >= 0; i--) {
|
||||
//如果当前的经验值大于所遍历到的等级 就设定等级为这个 然后不继续向更低等级遍历
|
||||
if (Config["戒指等级"][i.tostring()]["所需经验"]< exp) {
|
||||
Mysql_Operate_Func.SetExpAndLvById(SUser.GetCID(), i, exp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Cb_Use_Item_Sp_Func[Config["结婚等级1道具ID"]] <- function(SUser, ItemId) {
|
||||
// ExpUp(SUser, Config["道具1给的心意点"]);
|
||||
// }
|
||||
// Cb_Use_Item_Sp_Func[Config["结婚等级2道具ID"]] <- function(SUser, ItemId) {
|
||||
// ExpUp(SUser, Config["道具2给的心意点"]);
|
||||
// }
|
||||
// Cb_Use_Item_Sp_Func[Config["结婚等级3道具ID"]] <- function(SUser, ItemId) {
|
||||
// ExpUp(SUser, Config["道具3给的心意点"]);
|
||||
// }
|
||||
|
||||
|
||||
// function ExpUp(SUser, expUp) {
|
||||
// exp = Mysql_Operate_Func.GetExpById(SUser.GetCID())
|
||||
// exp = exp + expUp;
|
||||
// for (local i = 6; i >= 0; i--) {
|
||||
// //如果当前的经验值大于所遍历到的等级 就设定等级为这个 然后不继续向更低等级遍历
|
||||
// if (Config["戒指等级"][i.tostring()]["所需经验"]< exp) {
|
||||
// Mysql_Operate_Func.SetExpAndLvById(SUser.GetCID(), i, exp)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//初始化结婚
|
||||
// ProjectInitFuncMap.P_Marry <- Marry();
|
||||
@@ -46,4 +46,7 @@ MARRY_SQL_LIST.RomoveRoom <- @"DELETE FROM marry_room where rindex < UNIX_TIMEST
|
||||
MARRY_SQL_LIST.GetExpById <- @"SELECT experience FROM zyk.marry WHERE cid = %d";
|
||||
|
||||
//设置自己的经验值和等级
|
||||
MARRY_SQL_LIST.SetExpAndLvById <- @"UPDATE zyk.marry SET level = %d , experience = %d WHERE cid = %d or target_cid = %d";
|
||||
MARRY_SQL_LIST.SetExpAndLvById <- @"UPDATE zyk.marry SET level = %d , experience = %d WHERE cid = %d or target_cid = %d";
|
||||
|
||||
//根据cid获取uid
|
||||
MARRY_SQL_LIST.GetUidByCid <- @"SELECT m_id FROM taiwan_caincharac_info WHERE charac_no = %d";
|
||||
447
Dps_A/ProjectClass/New_Hook.nut
Normal file
447
Dps_A/ProjectClass/New_Hook.nut
Normal file
@@ -0,0 +1,447 @@
|
||||
/*
|
||||
文件名:New_Hook.nut
|
||||
路径:Dps_A/New_Hook.nut
|
||||
创建日期:2024-09-23 20:15
|
||||
文件用途:后续新增的玩家需求的HOOK
|
||||
*/
|
||||
//通用HOOK入口函数
|
||||
function _Hook_Enter_Currency_Func_(args, TableObj) {
|
||||
local Ret = null;
|
||||
foreach(Func in TableObj) {
|
||||
local Buf = Func(args);
|
||||
if (Buf) Ret = Buf;
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
//通用HOOK出口函数
|
||||
function _Hook_Leave_Currency_Func_(args, TableObj) {
|
||||
local Ret = null;
|
||||
foreach(Func in TableObj) {
|
||||
local Buf = Func(args);
|
||||
if (Buf) Ret = Buf;
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
//通用注册HOOK函数
|
||||
function _Hook_Register_Currency_Func_(AddressString, ArgRetArr, EnterTable, LeaveTable) {
|
||||
Haker.LoadHook(AddressString, ArgRetArr,
|
||||
function(args) {
|
||||
return _Hook_Enter_Currency_Func_(args, EnterTable);
|
||||
},
|
||||
function(args) {
|
||||
return _Hook_Leave_Currency_Func_(args, LeaveTable);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//玩家新增道具时
|
||||
Cb_User_Insert_Item_Enter_Func <- {};
|
||||
Cb_User_Insert_Item_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8502D86", ["pointer", "pointer", "int", "int", "int", "int", "int", "int", "int", "int", "int", "int", "int", "int", "int", "char", "int", "char", "char", "int"], Cb_User_Insert_Item_Enter_Func, Cb_User_Insert_Item_Leave_Func);
|
||||
|
||||
|
||||
//玩家捡起道具
|
||||
Cb_User_Get_Item_Enter_Func <- {};
|
||||
Cb_User_Get_Item_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x85B949C", ["pointer", "pointer", "int", "int", "int"], Cb_User_Get_Item_Enter_Func, Cb_User_Get_Item_Leave_Func);
|
||||
|
||||
//服务器Chat日志HOOK
|
||||
Cb_Server_Chat_Log_Enter_Func <- {};
|
||||
Cb_Server_Chat_Log_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x86C9638", ["pointer", "pointer", "char", "string", "char"], Cb_Server_Chat_Log_Enter_Func, Cb_Server_Chat_Log_Leave_Func);
|
||||
|
||||
//玩家上线设置IP
|
||||
Cb_User_Set_WebAddress_Enter_Func <- {};
|
||||
Cb_User_Set_WebAddress_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x84EC918", ["pointer", "pointer", "pointer"], Cb_User_Set_WebAddress_Enter_Func, Cb_User_Set_WebAddress_Leave_Func);
|
||||
|
||||
//服务端关闭执行函数
|
||||
Cb_Server_Close_Enter_Func <- {};
|
||||
Cb_Server_Close_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x829F28B", ["pointer", "pointer"], Cb_Server_Close_Enter_Func, Cb_Server_Close_Leave_Func);
|
||||
|
||||
//检查地下城的状况
|
||||
Cb_CheckInoutConditionDungeon_Enter_Func <- {};
|
||||
Cb_CheckInoutConditionDungeon_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x85ABC80", ["pointer", "pointer", "int", "int"], Cb_CheckInoutConditionDungeon_Enter_Func, Cb_CheckInoutConditionDungeon_Leave_Func);
|
||||
|
||||
//地下城现场杀死地狱党组怪物Cnt
|
||||
Cb_Field_KillHellPartyGroupMonsterCnt_Enter_Func <- {};
|
||||
Cb_Field_KillHellPartyGroupMonsterCnt_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x830D704", ["pointer", "pointer", "pointer", "bool"], Cb_Field_KillHellPartyGroupMonsterCnt_Enter_Func, Cb_Field_KillHellPartyGroupMonsterCnt_Leave_Func);
|
||||
|
||||
//经验收益
|
||||
Cb_Gain_Exp_Sp_Enter_Func <- {};
|
||||
Cb_Gain_Exp_Sp_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x866A3FE", ["pointer", "int", "int", "int", "int", "int", "char"], Cb_Gain_Exp_Sp_Enter_Func, Cb_Gain_Exp_Sp_Leave_Func);
|
||||
|
||||
|
||||
//货币收益
|
||||
Cb_Gain_Money_Enter_Func <- {};
|
||||
Cb_Gain_Money_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x84FF29C", ["int", "int", "char", "int", "int"], Cb_Gain_Money_Enter_Func, Cb_Gain_Money_Leave_Func);
|
||||
|
||||
//GetItem检查错误
|
||||
Cb_GetItem_Check_Error_Enter_Func <- {};
|
||||
Cb_GetItem_Check_Error_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81C35AC", ["pointer", "pointer", "pointer", "int"], Cb_GetItem_Check_Error_Enter_Func, Cb_GetItem_Check_Error_Leave_Func);
|
||||
|
||||
//队伍清除副本
|
||||
Cb_ClearDungeon_Enter_Func <- {};
|
||||
Cb_ClearDungeon_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x85a9330", ["pointer", "void"], Cb_ClearDungeon_Enter_Func, Cb_ClearDungeon_Leave_Func);
|
||||
|
||||
//检查选择进入副本时状态
|
||||
Cb_SelectDungeon_Check_Error_Enter_Func <- {};
|
||||
Cb_SelectDungeon_Check_Error_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81C7F32", ["pointer", "pointer", "pointer", "int"], Cb_SelectDungeon_Check_Error_Enter_Func, Cb_SelectDungeon_Check_Error_Leave_Func);
|
||||
|
||||
//切换装备
|
||||
Cb_CInventory_ChangeEquip_Enter_Func <- {};
|
||||
Cb_CInventory_ChangeEquip_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x84FC37E", ["pointer", "int", "pointer", "int"], Cb_CInventory_ChangeEquip_Enter_Func, Cb_CInventory_ChangeEquip_Leave_Func);
|
||||
|
||||
//获取通关时间回调
|
||||
Cb_CParty_SetBestClearTime_Enter_Func <- {};
|
||||
Cb_CParty_SetBestClearTime_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x85BE178", ["pointer", "char", "int", "int", "bool"], Cb_CParty_SetBestClearTime_Enter_Func, Cb_CParty_SetBestClearTime_Leave_Func);
|
||||
|
||||
//使用称号回收箱时检查使用条件
|
||||
Cb_UseLimitCube_Check_Error_Enter_Func <- {};
|
||||
Cb_UseLimitCube_Check_Error_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081D3BBC", ["pointer", "int", "int", "int", "pointer", "pointer", "pointer", "int"], Cb_UseLimitCube_Check_Error_Enter_Func, Cb_UseLimitCube_Check_Error_Leave_Func);
|
||||
|
||||
//使用称号回收箱过程
|
||||
Cb_UseLimitCube_Process_Enter_Func <- {};
|
||||
Cb_UseLimitCube_Process_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081D3D38", ["pointer", "pointer", "pointer", "pointer", "int"], Cb_UseLimitCube_Process_Enter_Func, Cb_UseLimitCube_Process_Leave_Func);
|
||||
|
||||
//购买商城物品时日志
|
||||
Cb_Log_BuyCashShopItem_Enter_Func <- {};
|
||||
Cb_Log_BuyCashShopItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08686EA0", ["pointer", "int", "int", "int", "int", "char", "int", "int", "int"], Cb_Log_BuyCashShopItem_Enter_Func, Cb_Log_BuyCashShopItem_Leave_Func);
|
||||
|
||||
//购买道具获取信息
|
||||
Cb_BuyItem_Get_Data_Enter_Func <- {};
|
||||
Cb_BuyItem_Get_Data_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81BE658", ["pointer", "pointer", "int", "pointer", "int"], Cb_BuyItem_Get_Data_Enter_Func, Cb_BuyItem_Get_Data_Leave_Func);
|
||||
|
||||
//设置角色详细信息
|
||||
Cb_Set_Charac_Info_Detail_Enter_Func <- {};
|
||||
Cb_Set_Charac_Info_Detail_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0864AC1A", ["pointer", "int", "int", "pointer", "int"], Cb_Set_Charac_Info_Detail_Enter_Func, Cb_Set_Charac_Info_Detail_Leave_Func);
|
||||
|
||||
//使用远古地下城道具
|
||||
Cb_UseAncientDungeonItems_Enter_Func <- {};
|
||||
Cb_UseAncientDungeonItems_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x859EAC2", ["pointer", "pointer", "pointer", "pointer", "int"], Cb_UseAncientDungeonItems_Enter_Func, Cb_UseAncientDungeonItems_Leave_Func);
|
||||
|
||||
//购买限时商品
|
||||
Cb_BuyCeraShopLimitItem_Enter_Func <- {};
|
||||
Cb_BuyCeraShopLimitItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x821F9BA", ["pointer", "pointer", "pointer", "int"], Cb_BuyCeraShopLimitItem_Enter_Func, Cb_BuyCeraShopLimitItem_Leave_Func);
|
||||
|
||||
//获取下次清除时间
|
||||
Cb_User_GetLastClearTime_Enter_Func <- {};
|
||||
Cb_User_GetLastClearTime_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0864387E", ["pointer", "int"], Cb_User_GetLastClearTime_Enter_Func, Cb_User_GetLastClearTime_Leave_Func);
|
||||
|
||||
//每日可交易金币上限
|
||||
Cb_User_CharacInfo_IsAvailableCurCharacTradeGoldDaily_Enter_Func <- {};
|
||||
Cb_User_CharacInfo_IsAvailableCurCharacTradeGoldDaily_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08646496", ["pointer", "int", "int"], Cb_User_CharacInfo_IsAvailableCurCharacTradeGoldDaily_Enter_Func, Cb_User_CharacInfo_IsAvailableCurCharacTradeGoldDaily_Leave_Func);
|
||||
|
||||
//进入副本加载完毕时
|
||||
Cb_Party_OnStartMapFinishLoading_Enter_Func <- {};
|
||||
Cb_Party_OnStartMapFinishLoading_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085B170A", ["pointer", "int", "int"], Cb_Party_OnStartMapFinishLoading_Enter_Func, Cb_Party_OnStartMapFinishLoading_Leave_Func);
|
||||
|
||||
//房间清理完毕
|
||||
Cb_Battle_Field_onClearMap_Enter_Func <- {};
|
||||
Cb_Battle_Field_onClearMap_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0830DD2C", ["pointer", "bool", "char"], Cb_Battle_Field_onClearMap_Enter_Func, Cb_Battle_Field_onClearMap_Leave_Func);
|
||||
|
||||
//放弃副本
|
||||
Cb_Party_giveup_game_Enter_Func <- {};
|
||||
Cb_Party_giveup_game_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085B2BAA", ["pointer", "pointer", "bool", "bool", "bool", "void"], Cb_Party_giveup_game_Enter_Func, Cb_Party_giveup_game_Leave_Func);
|
||||
|
||||
//迷妄之塔 死亡之塔通关时
|
||||
Cb_CDeathTower_onClear_Enter_Func <- {};
|
||||
Cb_CDeathTower_onClear_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08467E60", ["pointer", "bool", "int"], Cb_CDeathTower_onClear_Enter_Func, Cb_CDeathTower_onClear_Leave_Func);
|
||||
|
||||
//无尽祭坛通关时
|
||||
Cb_CBloodClearRewardData_Enter_Func <- {};
|
||||
Cb_CBloodClearRewardData_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08306FC4", ["pointer", "bool", "int", "pointer", "pointer", "bool"], Cb_CBloodClearRewardData_Enter_Func, Cb_CBloodClearRewardData_Leave_Func);
|
||||
|
||||
//进入迷妄之塔 死亡之塔时
|
||||
Cb_DeathTowerStageCommand_Enter_Func <- {};
|
||||
Cb_DeathTowerStageCommand_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08208A9E", ["pointer", "pointer", "pointer", "int"], Cb_DeathTowerStageCommand_Enter_Func, Cb_DeathTowerStageCommand_Leave_Func);
|
||||
|
||||
//离开迷妄之塔 死亡之塔时
|
||||
Cb_CDeathTower_onLeaveUser_Enter_Func <- {};
|
||||
Cb_CDeathTower_onLeaveUser_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084636F2", ["pointer", "pointer", "int"], Cb_CDeathTower_onLeaveUser_Enter_Func, Cb_CDeathTower_onLeaveUser_Leave_Func);
|
||||
|
||||
//玩家交易过程
|
||||
Cb_TradeSpace_proceed_trade_Enter_Func <- {};
|
||||
Cb_TradeSpace_proceed_trade_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0853087A", ["pointer", "int"], Cb_TradeSpace_proceed_trade_Enter_Func, Cb_TradeSpace_proceed_trade_Leave_Func);
|
||||
|
||||
//发送多物品邮件
|
||||
Cb_MultiMailBoxReqSend_Enter_Func <- {};
|
||||
Cb_MultiMailBoxReqSend_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084E27B8", ["pointer", "pointer", "pointer", "int"], Cb_MultiMailBoxReqSend_Enter_Func, Cb_MultiMailBoxReqSend_Leave_Func);
|
||||
|
||||
//发送单物品邮件
|
||||
Cb_MailBox_Send_Enter_Func <- {};
|
||||
Cb_MailBox_Send_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081CC958", ["pointer", "pointer", "pointer", "pointer", "int"], Cb_MailBox_Send_Enter_Func, Cb_MailBox_Send_Leave_Func);
|
||||
|
||||
//发送金币邮件时是否通过验证
|
||||
Cb_checkHumanCertify_Enter_Func <- {};
|
||||
Cb_checkHumanCertify_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0867F4C8", ["pointer", "int", "pointer", "int"], Cb_checkHumanCertify_Enter_Func, Cb_checkHumanCertify_Leave_Func);
|
||||
|
||||
//摆摊购买
|
||||
Cb_CPrivateStore_BuyItem_Enter_Func <- {};
|
||||
Cb_CPrivateStore_BuyItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085C924C", ["pointer", "int", "pointer", "int", "int", "int", "int", "int"], Cb_CPrivateStore_BuyItem_Enter_Func, Cb_CPrivateStore_BuyItem_Leave_Func);
|
||||
|
||||
//拍卖行上架
|
||||
Cb_AuctionResultAskRegistedItemNum_Enter_Func <- {};
|
||||
Cb_AuctionResultAskRegistedItemNum_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084D5930", ["pointer", "pointer", "pointer", "int"], Cb_AuctionResultAskRegistedItemNum_Enter_Func, Cb_AuctionResultAskRegistedItemNum_Leave_Func);
|
||||
|
||||
//拍卖行购买物品
|
||||
Cb_AuctionLogMessage_Enter_Func <- {};
|
||||
Cb_AuctionLogMessage_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084D7A90", ["pointer", "pointer", "pointer", "int"], Cb_AuctionLogMessage_Enter_Func, Cb_AuctionLogMessage_Leave_Func);
|
||||
|
||||
//副本内生成物品时
|
||||
Cb_Battle_Field_MakeDropItems_Enter_Func <- {};
|
||||
Cb_Battle_Field_MakeDropItems_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0830ADF6", ["pointer", "int", "int", "int", "short", "int", "int", "int", "char", "int", "int", "int", "void"], Cb_Battle_Field_MakeDropItems_Enter_Func, Cb_Battle_Field_MakeDropItems_Leave_Func);
|
||||
|
||||
//独立掉落几率
|
||||
Cb_IndependentItemRateControl_Enter_Func <- {};
|
||||
Cb_IndependentItemRateControl_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0834972F", ["pointer", "pointer", "int"], Cb_IndependentItemRateControl_Enter_Func, Cb_IndependentItemRateControl_Leave_Func);
|
||||
|
||||
//黑钻机添加物品到User时
|
||||
Cb_UseVendingMachine_putItemIntoUser_Enter_Func <- {};
|
||||
Cb_UseVendingMachine_putItemIntoUser_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0821B71C", ["int", "pointer", "int", "int", "int", "int"], Cb_UseVendingMachine_putItemIntoUser_Enter_Func, Cb_UseVendingMachine_putItemIntoUser_Leave_Func);
|
||||
|
||||
|
||||
//查看信息
|
||||
Cb_GetUserInfo_Enter_Func <- {};
|
||||
Cb_GetUserInfo_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081C3DD8", ["pointer", "pointer", "pointer", "int"], Cb_GetUserInfo_Enter_Func, Cb_GetUserInfo_Leave_Func);
|
||||
|
||||
|
||||
//初始化技能过程
|
||||
Cb_SkillInit_process_skill_Enter_Func <- {};
|
||||
Cb_SkillInit_process_skill_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081E5BDC", ["pointer", "pointer", "pointer", "void"], Cb_SkillInit_process_skill_Enter_Func, Cb_SkillInit_process_skill_Leave_Func);
|
||||
|
||||
//转职
|
||||
Cb_User_set_grow_Enter_Func <- {};
|
||||
Cb_User_set_grow_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086787FC", ["pointer", "int", "int", "int", "int", "void"], Cb_User_set_grow_Enter_Func, Cb_User_set_grow_Leave_Func);
|
||||
|
||||
//使用特殊道具时
|
||||
Cb_User_increase_status_Enter_Func <- {};
|
||||
Cb_User_increase_status_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x86657FC", ["pointer", "int", "void"], Cb_User_increase_status_Enter_Func, Cb_User_increase_status_Leave_Func);
|
||||
|
||||
//更新物品
|
||||
Cb_User_SendUpdateItem_Enter_Func <- {};
|
||||
Cb_User_SendUpdateItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0867C2D8", ["pointer", "int", "int", "int", "int"], Cb_User_SendUpdateItem_Enter_Func, Cb_User_SendUpdateItem_Leave_Func);
|
||||
|
||||
//幸运值获取装备品级
|
||||
Cb_LuckPoint_GetItemRarity_Enter_Func <- {};
|
||||
Cb_LuckPoint_GetItemRarity_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08550BE4", ["pointer", "pointer", "int", "int", "int"], Cb_LuckPoint_GetItemRarity_Enter_Func, Cb_LuckPoint_GetItemRarity_Leave_Func);
|
||||
|
||||
//添加时装到背包
|
||||
Cb_Inventory_AddAvatarItem_Enter_Func <- {};
|
||||
Cb_Inventory_AddAvatarItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08509B9E", ["int", "int", "int", "int", "int", "int", "pointer", "int", "int", "int", "int"], Cb_Inventory_AddAvatarItem_Enter_Func, Cb_Inventory_AddAvatarItem_Leave_Func);
|
||||
|
||||
//是否开启潜能
|
||||
Cb_Item_IsHiddenOption_Enter_Func <- {};
|
||||
Cb_Item_IsHiddenOption_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0817EDEC", ["pointer", "int"], Cb_Item_IsHiddenOption_Enter_Func, Cb_Item_IsHiddenOption_Leave_Func);
|
||||
|
||||
//返回1关闭商店回购
|
||||
Cb_Item_IsBanRedeemItem_Enter_Func <- {};
|
||||
Cb_Item_IsBanRedeemItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085F7BE0", ["pointer", "int"], Cb_Item_IsBanRedeemItem_Enter_Func, Cb_Item_IsBanRedeemItem_Leave_Func);
|
||||
|
||||
//副本内队伍加载完毕时
|
||||
Cb_CParty_finish_loading_Enter_Func <- {};
|
||||
Cb_CParty_finish_loading_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085B15E0", ["pointer", "pointer", "void"], Cb_CParty_finish_loading_Enter_Func, Cb_CParty_finish_loading_Leave_Func);
|
||||
|
||||
//检查删除角色时间 返回1则可立马删除新建角色
|
||||
Cb_User_CheckDeleteCharacTime_Enter_Func <- {};
|
||||
Cb_User_CheckDeleteCharacTime_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0864A830", ["pointer", "int", "int"], Cb_User_CheckDeleteCharacTime_Enter_Func, Cb_User_CheckDeleteCharacTime_Leave_Func);
|
||||
|
||||
//忽略在副本门口禁止摆摊
|
||||
Cb_CPrivateStore_IsAreaNearEntranceDungeon_Enter_Func <- {};
|
||||
Cb_CPrivateStore_IsAreaNearEntranceDungeon_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x085C5082", ["pointer", "pointer", "int"], Cb_CPrivateStore_IsAreaNearEntranceDungeon_Enter_Func, Cb_CPrivateStore_IsAreaNearEntranceDungeon_Leave_Func);
|
||||
|
||||
//解除每日创建角色数量限制
|
||||
Cb_CreateCharac_CheckLimitCreateNewCharac_Enter_Func <- {};
|
||||
Cb_CreateCharac_CheckLimitCreateNewCharac_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08401922", ["int", "pointer", "int"], Cb_CreateCharac_CheckLimitCreateNewCharac_Enter_Func, Cb_CreateCharac_CheckLimitCreateNewCharac_Leave_Func);
|
||||
|
||||
//脱离公会时
|
||||
Cb_MonitorNoticeGuildSecede_dispatch_Enter_Func <- {};
|
||||
Cb_MonitorNoticeGuildSecede_dispatch_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084C957E", ["pointer", "pointer", "pointer", "int"], Cb_MonitorNoticeGuildSecede_dispatch_Enter_Func, Cb_MonitorNoticeGuildSecede_dispatch_Leave_Func);
|
||||
|
||||
|
||||
//击杀怪物攻城怪物
|
||||
Cb_CVillageMonster_OnKillVillageMonster_Enter_Func <- {};
|
||||
Cb_CVillageMonster_OnKillVillageMonster_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B34A0", ["pointer", "pointer", "int", "int", "int", "bool", "int"], Cb_CVillageMonster_OnKillVillageMonster_Enter_Func, Cb_CVillageMonster_OnKillVillageMonster_Leave_Func);
|
||||
|
||||
//挑战攻城怪物副本结束事件, 更新怪物攻城活动各阶段状态
|
||||
Cb_CVillageMonster_SendVillageMonsterFightResult_Enter_Func <- {};
|
||||
Cb_CVillageMonster_SendVillageMonsterFightResult_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B330A", ["pointer", "pointer", "bool", "void"], Cb_CVillageMonster_SendVillageMonsterFightResult_Enter_Func, Cb_CVillageMonster_SendVillageMonsterFightResult_Leave_Func);
|
||||
|
||||
//刷新攻城怪物函数, 控制下一只刷新的攻城怪物id
|
||||
Cb_CVillageMonsterArea_GetAttackedMonster_Enter_Func <- {};
|
||||
Cb_CVillageMonsterArea_GetAttackedMonster_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B3AEA", ["pointer", "int", "int"], Cb_CVillageMonsterArea_GetAttackedMonster_Enter_Func, Cb_CVillageMonsterArea_GetAttackedMonster_Leave_Func);
|
||||
|
||||
//正在挑战的攻城怪物
|
||||
Cb_CVillageMonster_OnFightVillageMonster_Enter_Func <- {};
|
||||
Cb_CVillageMonster_OnFightVillageMonster_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B3240", ["pointer", "pointer", "int", "int", "int"], Cb_CVillageMonster_OnFightVillageMonster_Enter_Func, Cb_CVillageMonster_OnFightVillageMonster_Leave_Func);
|
||||
|
||||
//副本刷怪函数 控制副本内怪物的数量和属性
|
||||
Cb_MapInfo_Add_Mob_Enter_Func <- {};
|
||||
Cb_MapInfo_Add_Mob_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08151612", ["pointer", "pointer", "int"], Cb_MapInfo_Add_Mob_Enter_Func, Cb_MapInfo_Add_Mob_Leave_Func);
|
||||
|
||||
//怪物攻城通关时获得经验
|
||||
Cb_CVillageMonsterMgr_OnKillVillageMonster_Enter_Func <- {};
|
||||
Cb_CVillageMonsterMgr_OnKillVillageMonster_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B4866", ["pointer", "pointer", "bool", "int"], Cb_CVillageMonsterMgr_OnKillVillageMonster_Enter_Func, Cb_CVillageMonsterMgr_OnKillVillageMonster_Leave_Func);
|
||||
|
||||
//玩家使用复活币
|
||||
Cb_UseCoin_Enter_Func <- {};
|
||||
Cb_UseCoin_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81CA852", ["pointer", "pointer", "pointer", "pointer", "int"], Cb_UseCoin_Enter_Func, Cb_UseCoin_Leave_Func);
|
||||
|
||||
//玩家完成任务
|
||||
Cb_fnStatQuestClear_Enter_Func <- {};
|
||||
Cb_fnStatQuestClear_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8664412", ["pointer", "int", "int"], Cb_fnStatQuestClear_Enter_Func, Cb_fnStatQuestClear_Leave_Func);
|
||||
|
||||
//深渊派对开始时
|
||||
Cb_HellPartyStart_dispatch_Enter_Func <- {};
|
||||
Cb_HellPartyStart_dispatch_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x821D9A6", ["pointer", "pointer", "int"], Cb_HellPartyStart_dispatch_Enter_Func, Cb_HellPartyStart_dispatch_Leave_Func);
|
||||
|
||||
//获取道具日志
|
||||
Cb_UserHistoryLog_ItemAdd_Enter_Func <- {};
|
||||
Cb_UserHistoryLog_ItemAdd_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8682E84", ["pointer", "int", "int", "int", "pointer", "int", "void"], Cb_UserHistoryLog_ItemAdd_Enter_Func, Cb_UserHistoryLog_ItemAdd_Leave_Func);
|
||||
|
||||
//获取绝望之塔进入次数
|
||||
Cb_TOD_UserState_getEnterCount_Enter_Func <- {};
|
||||
Cb_TOD_UserState_getEnterCount_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8643872", ["pointer", "int"], Cb_TOD_UserState_getEnterCount_Enter_Func, Cb_TOD_UserState_getEnterCount_Leave_Func);
|
||||
|
||||
|
||||
//掉落道具
|
||||
Cb_GetItemRarity_Enter_Func <- {};
|
||||
Cb_GetItemRarity_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8550BE4", ["pointer", "pointer", "int", "int", "int", ], Cb_GetItemRarity_Enter_Func, Cb_GetItemRarity_Leave_Func);
|
||||
|
||||
//怪物死亡爆奖励的时候
|
||||
Cb_dispatch_sig_Enter_Func <- {};
|
||||
Cb_dispatch_sig_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81EB0C4", ["pointer", "pointer", "pointer", "int"], Cb_dispatch_sig_Enter_Func, Cb_dispatch_sig_Leave_Func);
|
||||
|
||||
//装备解锁动作
|
||||
Cb_CItemLock_DoItemUnlock_Enter_Func <- {};
|
||||
Cb_CItemLock_DoItemUnlock_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x854231A", ["pointer", "pointer", "int", "int", "int"], Cb_CItemLock_DoItemUnlock_Enter_Func, Cb_CItemLock_DoItemUnlock_Leave_Func);
|
||||
|
||||
//丢弃物品检查错误
|
||||
Cb_DropItem_check_error_Enter_Func <- {};
|
||||
Cb_DropItem_check_error_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x81C2D9A", ["pointer", "pointer", "pointer", "pointer", "int"], Cb_DropItem_check_error_Enter_Func, Cb_DropItem_check_error_Leave_Func);
|
||||
|
||||
//城镇瞬移
|
||||
Cb_GameWorld_move_area_Enter_Func <- {};
|
||||
Cb_GameWorld_move_area_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086C5A84", ["pointer", "pointer", "int", "int", "int", "int", "int", "int", "int", "int", "int", "int"], Cb_GameWorld_move_area_Enter_Func, Cb_GameWorld_move_area_Leave_Func);
|
||||
|
||||
|
||||
//称号回包
|
||||
Cb_CTitleBook_putItemData_Enter_Func <- {};
|
||||
Cb_CTitleBook_putItemData_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08641A6A", ["pointer", "pointer", "int", "pointer", "int"], Cb_CTitleBook_putItemData_Enter_Func, Cb_CTitleBook_putItemData_Leave_Func);
|
||||
|
||||
//设计图继承
|
||||
Cb_CUsercopyItemOption_Enter_Func <- {};
|
||||
Cb_CUsercopyItemOption_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08671EB2", ["pointer", "pointer", "pointer", "int"], Cb_CUsercopyItemOption_Enter_Func, Cb_CUsercopyItemOption_Leave_Func);
|
||||
|
||||
|
||||
//装备开孔
|
||||
Cb_AddSocketToAvatar_Enter_Func <- {};
|
||||
Cb_AddSocketToAvatar_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0821A412", ["pointer", "pointer", "pointer", "int"], Cb_AddSocketToAvatar_Enter_Func, Cb_AddSocketToAvatar_Leave_Func);
|
||||
|
||||
//装备镶嵌和时装镶嵌
|
||||
Cb_Dispatcher_UseJewel_Enter_Func <- {};
|
||||
Cb_Dispatcher_UseJewel_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8217BD6", ["int", "pointer", "pointer", "int"], Cb_Dispatcher_UseJewel_Enter_Func, Cb_Dispatcher_UseJewel_Leave_Func);
|
||||
|
||||
//额外数据包,发送装备镶嵌数据给本地处理
|
||||
Cb_InterfacePacketBuf_put_packet_Enter_Func <- {};
|
||||
Cb_InterfacePacketBuf_put_packet_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0815098e", ["pointer", "pointer", "int"], Cb_InterfacePacketBuf_put_packet_Enter_Func, Cb_InterfacePacketBuf_put_packet_Leave_Func);
|
||||
|
||||
|
||||
//额外数据包,发送装备镶嵌数据给本地处理
|
||||
Cb_PacketBuf_get_short_Enter_Func <- {};
|
||||
Cb_PacketBuf_get_short_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0858D0B0", ["pointer", "pointer", "int"], Cb_PacketBuf_get_short_Enter_Func, Cb_PacketBuf_get_short_Leave_Func);
|
||||
|
||||
|
||||
//公会普通信息回包
|
||||
Cb_MonitorNoticeGuildChatMsg_Enter_Func <- {};
|
||||
Cb_MonitorNoticeGuildChatMsg_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084C9E30", ["pointer", "pointer", "pointer", "int"], Cb_MonitorNoticeGuildChatMsg_Enter_Func, Cb_MonitorNoticeGuildChatMsg_Leave_Func);
|
||||
|
||||
//公会超链接信息回包
|
||||
Cb_MonitorNoticeGuildChatMsgHyperLink_Enter_Func <- {};
|
||||
Cb_MonitorNoticeGuildChatMsgHyperLink_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x084E503C", ["pointer", "pointer", "pointer", "int"], Cb_MonitorNoticeGuildChatMsgHyperLink_Enter_Func, Cb_MonitorNoticeGuildChatMsgHyperLink_Leave_Func);
|
||||
|
||||
//检查移动技能槽位
|
||||
Cb_CheckMoveComboSkillSlot_Enter_Func <- {};
|
||||
Cb_CheckMoveComboSkillSlot_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08608C98", ["pointer", "char", "char", "bool"], Cb_CheckMoveComboSkillSlot_Enter_Func, Cb_CheckMoveComboSkillSlot_Leave_Func);
|
||||
|
||||
//检查插入快捷技能槽位
|
||||
Cb_CheckComboSkillInsertQuickSlot_Enter_Func <- {};
|
||||
Cb_CheckComboSkillInsertQuickSlot_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08608D58", ["pointer", "int", "bool"], Cb_CheckComboSkillInsertQuickSlot_Enter_Func, Cb_CheckComboSkillInsertQuickSlot_Leave_Func);
|
||||
Reference in New Issue
Block a user