MaKasTreRo Posted May 30, 2014 Posted May 30, 2014 Hello! I need adapt this code on last rev hi5. I cant find the line in file.. Index: dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java =================================================================== --- dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java (revision 8869) +++ dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java (working copy) @@ -16,6 +16,7 @@ import java.util.logging.Level; +import com.l2jserver.Config; import com.l2jserver.gameserver.handler.IBypassHandler; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance; @@ -121,7 +122,33 @@ StringUtil.append(list, "&$1718;"); // Standby } - StringUtil.append(list, " ", task.getGame().getPlayerNames()[0], " : ", task.getGame().getPlayerNames()[1]); + if (Config.ALT_OLY_ANTI_FEED) + { + if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE) + { + StringUtil.append(list, + " ", + task.getGame().getPlayerNames()[0], + " : ", + task.getGame().getPlayerNames()[1]); + } + else + { + StringUtil.append(list, + " ", + Config.ALT_OLY_ANTI_FEED_NAME, + " : ", + Config.ALT_OLY_ANTI_FEED_NAME); + } + } + else + { + StringUtil.append(list, + " ", + task.getGame().getPlayerNames()[0], + " : ", + task.getGame().getPlayerNames()[1]); + } } else { @@ -156,7 +183,33 @@ StringUtil.append(list, "&$1718;"); // Standby } - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); + if (Config.ALT_OLY_ANTI_FEED) + { + if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE) + { + StringUtil.append(list, + "</td><td>", + task.getGame().getPlayerNames()[0], + " ", + task.getGame().getPlayerNames()[1]); + } + else + { + StringUtil.append(list, + "</td><td>", + Config.ALT_OLY_ANTI_FEED_NAME, + " ", + Config.ALT_OLY_ANTI_FEED_NAME); + } + } + else + { + StringUtil.append(list, + "</td><td>", + task.getGame().getPlayerNames()[0], + " ", + task.getGame().getPlayerNames()[1]); + } } else { @@ -187,7 +240,33 @@ StringUtil.append(list, "&$1718;"); // Standby } - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); + if (Config.ALT_OLY_ANTI_FEED) + { + if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE) + { + StringUtil.append(list, + "</td><td>", + task.getGame().getPlayerNames()[0], + " ", + task.getGame().getPlayerNames()[1]); + } + else + { + StringUtil.append(list, + "</td><td>", + Config.ALT_OLY_ANTI_FEED_NAME, + " ", + Config.ALT_OLY_ANTI_FEED_NAME); + } + } + else + { + StringUtil.append(list, + "</td><td>", + task.getGame().getPlayerNames()[0], + " ", + task.getGame().getPlayerNames()[1]); + } } else { Index: dist/game/data/scripts/handlers/skillhandlers/Spoil.java =================================================================== --- dist/game/data/scripts/handlers/skillhandlers/Spoil.java (revision 8869) +++ dist/game/data/scripts/handlers/skillhandlers/Spoil.java (working copy) @@ -14,6 +14,7 @@ */ package handlers.skillhandlers; +import com.l2jserver.Config; import com.l2jserver.gameserver.ai.CtrlEvent; import com.l2jserver.gameserver.handler.ISkillHandler; import com.l2jserver.gameserver.model.L2Object; @@ -73,7 +74,10 @@ else { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_RESISTED_YOUR_S2); - sm.addCharName(target); + if (((L2PcInstance) activeChar).isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + sm.addPcFakeName(); + else + sm.addCharName(target); sm.addSkillName(skill); activeChar.sendPacket(sm); } Index: java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java =================================================================== --- java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java (revision 5380) +++ java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java (working copy) @@ -178,16 +178,28 @@ { writeC(_invisible? 1 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation) } - - writeS(_activeChar.getAppearance().getVisibleName()); - + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeS(Config.ALT_OLY_ANTI_FEED_NAME);//name in Olympiad when anti feed is on + } + else + { + writeS(_activeChar.getAppearance().getVisibleName()); + } if (gmSeeInvis) { writeS("Invisible"); } else { + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeS(Config.ALT_OLY_ANTI_FEED_TITLE);//title in Olympiad when anti feed is on + } + else + { writeS(_activeChar.getAppearance().getVisibleTitle()); + } } writeD(0); @@ -203,8 +215,16 @@ writeD(_activeChar.getAbnormalEffect()); // C2 } - writeD(_activeChar.getClanId()); //clan id - writeD(_activeChar.getClanCrestId()); //crest id + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeD(0);//clan in Olympiad(anti feed) + writeD(0); + } + else + { + writeD(_activeChar.getClanId()); //clan id + writeD(_activeChar.getClanCrestId()); //crest id + } writeD(0); // C2 writeD(0); // C2 writeC(0); // C2 @@ -232,7 +252,14 @@ writeD(_z); writeD(_vehicleId); writeD(_objId); - writeS(_activeChar.getAppearance().getVisibleName()); + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeS(Config.ALT_OLY_ANTI_FEED_NAME);//name in Olympiad when anti feed is on + } + else + { + writeS(_activeChar.getAppearance().getVisibleName()); + } writeD(_activeChar.getRace().ordinal()); writeD(_activeChar.getAppearance().getSex() ? 1 : 0); @@ -354,15 +381,32 @@ } else { + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeS(Config.ALT_OLY_ANTI_FEED_TITLE);//title in Olympiad when anti feed is on + } + else + { writeS(_activeChar.getAppearance().getVisibleTitle()); + } } if (!_activeChar.isCursedWeaponEquipped()) { - writeD(_activeChar.getClanId()); - writeD(_activeChar.getClanCrestId()); - writeD(_activeChar.getAllyId()); - writeD(_activeChar.getAllyCrestId()); + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeD(0);//clan ally in Olympiad (anti feed) + writeD(0); + writeD(0); + writeD(0); + } + else + { + writeD(_activeChar.getClanId()); + writeD(_activeChar.getClanCrestId()); + writeD(_activeChar.getAllyId()); + writeD(_activeChar.getAllyCrestId()); + } } else { @@ -420,7 +464,15 @@ writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I - writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + if (Config.ALT_OLY_ANTI_FEED_HERO_GLOW) + writeC(1); + else if (!Config.ALT_OLY_ANTI_FEED_HERO_GLOW) + writeC(0); + } + else + writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); //0x01: Fishing Mode (Cant be undone by setting back to 0) writeD(_activeChar.getFishx()); @@ -434,7 +486,14 @@ writeD(_activeChar.getPledgeClass()); writeD(_activeChar.getPledgeType()); - writeD(_activeChar.getAppearance().getTitleColor()); + if (_activeChar.isInOlympiadMode() && Config.ALT_OLY_ANTI_FEED) + { + writeD(0x00CCFF);//title color in Olympiad (Anti Feed) + } + else + { + writeD(_activeChar.getAppearance().getTitleColor()); + } if (_activeChar.isCursedWeaponEquipped()) writeD(CursedWeaponsManager.getInstance().getLevel(_activeChar.getCursedWeaponEquippedId())); Quote
0 nikosdevil20 Posted May 30, 2014 Posted May 30, 2014 this is in datapack: dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java where is the line of you cant find? Quote
0 MaKasTreRo Posted May 30, 2014 Author Posted May 30, 2014 this is in datapack: dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java where is the line of you cant find? CharInfo.java -writeS(_activeChar.getAppearance().getVisibleName()); - writeD(_activeChar.getClanId()); //clan id - writeD(_activeChar.getClanCrestId()); //crest id -writeS(_activeChar.getAppearance().getVisibleName()); - writeD(_activeChar.getClanId()); - writeD(_activeChar.getClanCrestId()); - writeD(_activeChar.getAllyId()); - writeD(_activeChar.getAllyCrestId()); -writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura - writeD(_activeChar.getAppearance().getTitleColor()); OlympiadObservation.java - StringUtil.append(list, " ", task.getGame().getPlayerNames()[0], " : ", task.getGame().getPlayerNames()[1]); - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); Spoil.java - sm.addCharName(target); Thanks!!! dude! Quote
0 nikosdevil20 Posted May 31, 2014 Posted May 31, 2014 (edited) CharInfo.java -writeS(_activeChar.getAppearance().getVisibleName()); - writeD(_activeChar.getClanId()); //clan id - writeD(_activeChar.getClanCrestId()); //crest id -writeS(_activeChar.getAppearance().getVisibleName()); - writeD(_activeChar.getClanId()); - writeD(_activeChar.getClanCrestId()); - writeD(_activeChar.getAllyId()); - writeD(_activeChar.getAllyCrestId()); -writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura - writeD(_activeChar.getAppearance().getTitleColor()); OlympiadObservation.java - StringUtil.append(list, " ", task.getGame().getPlayerNames()[0], " : ", task.getGame().getPlayerNames()[1]); - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); - StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]); Spoil.java - sm.addCharName(target); Thanks!!! dude! you cant find the files Spoil.java for example or you find a files and you cant find the lines in this files? Edited May 31, 2014 by nikosdevil20 Quote
Question
MaKasTreRo
Hello!
I need adapt this code on last rev hi5. I cant find the line in file..
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.