- 雷霆传奇H5-合区教程-合区方法-合区代码
-
信息编号:T-2159 时间:10-21 21:39:37 有效期:756天有效 浏览量:4人次 -
以下为隐藏内容:
actor_plat_slave替换为二区数据库名
index_slave替换为二区服务器ID
index_master替换为一区服务器ID
替换完成后
在一区数据库执行
注意:是把2区合进1区
如果1区合进2区 就反着来
合区代码:
- #从actor_plat_slave导入角色二进制数据
insert into actorbinarydata (select * from actor_plat_slave.actorbinarydata);
#从actor_plat_slave导入角色数据
insert into actors (select * from actor_plat_slave.actors where serverindex=index_slave);
#从actor_plat_slave导入角色物品数据
insert into items (select * from actor_plat_slave.items);
#从actor_plat_slave导入角色脚本数据
insert into actorvariable (select * from actor_plat_slave.actorvariable);
#从actor_plat_slave导入mail
insert into mails (select * from actor_plat_slave.mails);
#从actor_plat_slave导入角色列表
insert into roles (select * from actor_plat_slave.roles);
#从actor_plat_slave导入旧的角色名
insert into actoroldname (select * from actor_plat_slave.actoroldname where serverindex=index_slave);
#从actor_plat_slave导入工会列表
insert into guildlist (select * from actor_plat_slave.guildlist where serverindex=index_slave);
#导入工会信息
insert into actorguild (select * from actor_plat_slave.actorguild);
insert into guildlog (select * from actor_plat_slave.guildlog);
insert into guildchat (select * from actor_plat_slave.guildchat);
insert into guildstorelog (select * from actor_plat_slave.guildstorelog);
#从actor_plat_slave导入好友列表
insert into friends (select * from actor_plat_slave.friends);
#导入拍卖行信息
insert into auction (select * from actor_plat_slave.auction where serverid=index_slave);
#----------------------------------------------------------------
#更新主服actor_plat_master全服邮件ID为0, 清除主服actor_plat_master的全服邮件
TRUNCATE globalmails;
#TRUNCATE actorservermail;
#检查修正角色名重复现象……
create temporary table tmp_charname SELECT actorname,actorid FROM actors;
alter table tmp_charname add index tmp_charname(actorname);
ALTER TABLE actors add column tmpmailfile int default 0;
UPDATE actors SET actorname=CONCAT(actorname,'[sindex_slave]'), tmpmailfile=1 WHERE
(actorname in (SELECT actorname FROM tmp_charname where actors.actorid <> tmp_charname.actorid)) AND (serverindex=index_slave);
insert into offlinemails (`actorid`, `head`, `context`, `file0_type`, `file0_id`, `file0_num`) (select actorid,"合服改名卡补发","尊敬的勇士,由于你的名称和其他勇士重复,特补发改名卡一张,请在附件中领取。",1,450001,1 from actors where actors.tmpmailfile = 1);
alter table actors drop column tmpmailfile;
drop table tmp_charname;
create temporary table tmp_guildname SELECT guildname,guildid FROM guildlist;
alter table tmp_guildname add index tmp_guildname(guildname);
ALTER TABLE guildlist add column tmpmailfile int default 0;
UPDATE guildlist SET guildname=CONCAT(guildname,'[sindex_slave]'), tmpmailfile=1 WHERE
(guildname in (SELECT guildname FROM tmp_guildname where guildlist.guildid <> tmp_guildname.guildid)) AND (serverindex=index_slave);
UPDATE guildlist SET changenamenum=1 WHERE tmpmailfile=1 AND changenamenum <= 1;
alter table guildlist drop column tmpmailfile;
drop table tmp_guildname;
#检查修正旧角色名重复现象……
create temporary table tmp_charoldname SELECT oldname,actorid FROM actoroldname;
alter table tmp_charoldname add index tmp_actoroldname(oldname);
UPDATE actoroldname SET oldname=CONCAT(oldname,'[sindex_slave]') WHERE
(oldname in (SELECT oldname FROM tmp_charoldname where actoroldname.actorid <> tmp_charoldname.actorid)) AND (serverindex=index_slave);
drop table tmp_charoldname;
ALTER TABLE actors add column tmpmailfile int default 0;
UPDATE actors SET actorname=CONCAT(actorname,'[sindex_slave]'), tmpmailfile=1 WHERE
(actorname in (SELECT oldname FROM actoroldname where actoroldname.actorid <> actors.actorid)) AND (serverindex=index_slave);
insert into offlinemails (`actorid`, `head`, `context`, `file0_type`, `file0_id`, `file0_num`) (select actorid,"合服改名卡补发","尊敬的勇士,由于你的名称和其他勇士重复,特补发改名卡一张,请在附件中领取。",1,450001,1 from actors where actors.tmpmailfile = 1);
alter table actors drop column tmpmailfile;
UPDATE actoroldname SET oldname=CONCAT(oldname,'[sindex_slave]') WHERE
(oldname in (SELECT actorname FROM actors where actors.actorid <> actoroldname.actorid)) AND (serverindex=index_slave);
#改变角色归属服务器……
update actors set serverindex = index_master where serverindex=index_slave;
#改变帮会归属服务器……
update guildlist set serverindex = index_master where serverindex=index_slave;
#改变拍卖行商品归属服务器……
update auction set serverid = index_master where serverid=index_slave;
#清除小号
drop table if exists cidx;
CREATE TEMPORARY TABLE cidx(`actorid` int not null primary key);
#选出长期没登陆的actorid
#actor_plat_slave的小号
insert into cidx (select actorid from actor_plat_slave.actors where recharge=0 and level<=35 and updatetime<=subdate(now(),interval 30 day));
#改变角色旧名的归属服务器……
update actoroldname set serverindex = index_master where serverindex=index_slave;
#清除二进制数据
delete from actorbinarydata where actorid in (select actorid from cidx);
#清除帮派
delete from actorguild where actorid in (select actorid from cidx);
#清除邮件系统
delete from mails where actorid in (select actorid from cidx);
#清除角色数据
delete from actors where actorid in (select actorid from cidx);
#清除脚本数据
delete from actorvariable where actorid in (select actorid from cidx);
#roles
delete from roles where actorid in (select actorid from cidx);
#物品
delete from items where actorid in (select actorid from cidx);
#清理完成
●友情提示
信息自选┆使用自愿┆真伪自辨┆风险自担
使用信息须知(必读)
①本主题所有言论和图片纯属会员个人意见,与本站立场无关
②本站所有主题由该帖子作者发表,该帖子作者与本站享有帖子相关版权
③173资源网仅提供信息交流平台,不介入任何交易过程,不承担安全风险和法律责任
④本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
⑤该页面资源下载仅保存于网盘,本站不涉及储存,用户下载仅供学习参考,不得用户商业用途
⑥如有侵权内容困扰请联系youxi@111.com,我们将针对版权信息及时予以删除
-
免责声明: 本网不承担任何由内容提供商提供的信息所引起的争议和法律责任
备案号:桂ICP备2022010778号-6
业务电话:131-131-131-13 工作时间:周一至周五早8:00~晚5:00 业务微信: 违法和不良信息举报电话:131-131-131-13
免费发布信息[非常简单] 查找/修改/撤销信息 置顶推广信息 服务协议/隐私政策 ※特别提示:提高警惕,谨防诈骗
备案号:桂ICP备2022010778号-6
业务电话:131-131-131-13 工作时间:周一至周五早8:00~晚5:00 业务微信: 违法和不良信息举报电话:131-131-131-13
免费发布信息[非常简单] 查找/修改/撤销信息 置顶推广信息 服务协议/隐私政策 ※特别提示:提高警惕,谨防诈骗