This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
AdBlock Extension Detected!
Our website is made possible by displaying online advertisements to our members.
Please disable AdBlock browser extension first, to be able to use our community.
Question
MaKasTreRo
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()));4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now