为创业者
服务

雷霆传奇H5-合区教程-合区方法-合区代码

雷霆传奇H5-合区教程-合区方法-合区代码

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);

    #清理完成

复制代码

雷霆传奇H5-合区教程-合区方法-合区代码

雷霆传奇H5-合区教程-合区方法-合区代码

雷霆传奇H5-合区教程-合区方法-合区代码

免责声明:站内部分内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。展示内容仅作为学习交流使用,其版权归出版公司或原作者所有,本站不对所涉及的版权问题负责。如原作者认为侵权,请联系我们,我们会立即删除文章!蜗牛学社 » 雷霆传奇H5-合区教程-合区方法-合区代码
分享到: 更多 (0)