Авторизация
Подписчики
0
Сохранение Цвета Ника После Рестарта
Описание
Подробная инструкция
Файл:
Скрытый текст
L2j Core\java\com\l2jserver\gameserver\model\actor\instance\L2PcInstance.java
1. Открываем файл.
2. Ctrl+F и ищем Character Character SQL String Definitions
3. Ниже видим 3 строки, удаляем их.
4. И заменяем их на:
Скрытый текст
private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face ,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid, d eletetime,cancraft,title,title_color,name_color,accesslevel,online,isin7sdungeon , clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,name_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?"; private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, name_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_lev el,bookmarkslot,vitality_points,createDate,language FROM characters WHERE charId=?";
5. Ctrl+F и ищем statement.setString(1, _accountName);
6. Ниже видим пунтк 7
7. Изменяем старое на новое, указано ниже:
Скрытый текст
statement.setString(1, _accountName); statement.setInt(2, getObjectId()); statement.setString(3, getName()); statement.setInt(4, getLevel()); statement.setInt(5, getMaxHp()); statement.setDouble(6, getCurrentHp()); statement.setInt(7, getMaxCp()); statement.setDouble(8, getCurrentCp()); statement.setInt(9, getMaxMp()); statement.setDouble(10, getCurrentMp()); statement.setInt(11, getAppearance().getFace()); statement.setInt(12, getAppearance().getHairStyle()); statement.setInt(13, getAppearance().getHairColor()); statement.setInt(14, getAppearance().getSex()? 1 : 0); statement.setLong(15, getExp()); statement.setInt(16, getSp()); statement.setInt(17, getKarma()); statement.setInt(18, getFame()); statement.setInt(19, getPvpKills()); statement.setInt(20, getPkKills()); statement.setInt(21, getClanId()); statement.setInt(22, getRace().ordinal()); statement.setInt(23, getClassId().getId()); statement.setLong(24, getDeleteTimer()); statement.setInt(25, hasDwarvenCraft() ? 1 : 0); statement.setString(26, getTitle()); statement.setInt(27, getAppearance().getTitleColor()); statement.setInt(28, getAppearance().getNameColor()); statement.setInt(29, getAccessLevel().getLevel()); statement.setInt(30, isOnlineInt()); statement.setInt(31, isIn7sDungeon() ? 1 : 0); statement.setInt(32, getClanPrivileges()); statement.setInt(33, getWantsPeace()); statement.setInt(34, getBaseClass()); statement.setInt(35, getNewbie()); statement.setInt(36, isNoble() ? 1 :0); statement.setLong(37, 0); statement.setDate(38, new Date(getCreateDate().getTimeInMillis()));
8. Ctrl+F и ищем player.getAppearance().setTitleColor(rset.getInt("title_color"));
9. Ниже добавляем:
Скрытый текст
player.getAppearance().setNameColor(rset.getInt("name_color"));
10. Ctrl+F и ищем statement.setInt(1, level);
11. Изменяем старое на новое, указано ниже:
Скрытый текст
statement.setInt(1, level); statement.setInt(2, getMaxHp()); statement.setDouble(3, getCurrentHp()); statement.setInt(4, getMaxCp()); statement.setDouble(5, getCurrentCp()); statement.setInt(6, getMaxMp()); statement.setDouble(7, getCurrentMp()); statement.setInt(8, getAppearance().getFace()); statement.setInt(9, getAppearance().getHairStyle()); statement.setInt(10, getAppearance().getHairColor()); statement.setInt(11, getAppearance().getSex()? 1 : 0); statement.setInt(12, getHeading()); statement.setInt(13, _observerMode ? _lastX : getX()); statement.setInt(14, _observerMode ? _lastY : getY()); statement.setInt(15, _observerMode ? _lastZ : getZ()); statement.setLong(16, exp); statement.setLong(17, getExpBeforeDeath()); statement.setInt(18, sp); statement.setInt(19, getKarma()); statement.setInt(20, getFame()); statement.setInt(21, getPvpKills()); statement.setInt(22, getPkKills()); statement.setInt(23, getClanId()); statement.setInt(24, getRace().ordinal()); statement.setInt(25, getClassId().getId()); statement.setLong(26, getDeleteTimer()); statement.setString(27, getTitle()); statement.setInt(28, getAppearance().getTitleColor()); statement.setInt(29, getAppearance().getNameColor()); statement.setInt(30, getAccessLevel().getLevel()); statement.setInt(31, isOnlineInt()); statement.setInt(32, isIn7sDungeon() ? 1 : 0); statement.setInt(33, getClanPrivileges()); statement.setInt(34, getWantsPeace()); statement.setInt(35, getBaseClass()); long totalOnlineTime = _onlineTime; if (_onlineBeginTime > 0) totalOnlineTime += (System.currentTimeMillis()-_onlineBeginTime)/1000; statement.setLong(36, totalOnlineTime); statement.setInt(37, getPunishLevel().value()); statement.setLong(38, getPunishTimer()); statement.setInt(39, getNewbie()); statement.setInt(40, isNoble() ? 1 : 0); statement.setInt(41, getPowerGrade()); statement.setInt(42, getPledgeType()); statement.setInt(43,getLvlJoinedAcademy()); statement.setLong(44,getApprentice()); statement.setLong(45,getSponsor()); statement.setInt(46, getAllianceWithVarkaKetra()); statement.setLong(47, getClanJoinExpiryTime()); statement.setLong(48, getClanCreateExpiryTime()); statement.setString(49, getName()); statement.setLong(50, getDeathPenaltyBuffLevel()); statement.setInt(51, getBookMarkSlot()); statement.setInt(52, getVitalityPoints()); statement.setString(53, getLang()); statement.setInt(54, getObjectId());
12. Заходим в Navicat, открываем базу и удаляем колонку characters
13. Скачиваем прикрепленный к теме файл characters.sql и заливаем его вместо старого.
Рекомендуемые комментарии
Комментариев нет