Przeglądaj źródła

minor changes:
- ctrl not needed when using offensive skill in clan war
- found and fixed one more getEffects(null,..)
- m.onGeodataPathIndex = -1 was missing from boat movement but
seems more fixes are still required
- client 0,0 coords not accepted if server x not 0 (we're suspecting
a related player drop bug)

Sami 16 lat temu
rodzic
commit
e7c107d93c

+ 1 - 2
L2_GameServer/java/net/sf/l2j/gameserver/handler/itemhandlers/EnergyStone.java

@@ -16,7 +16,6 @@ package net.sf.l2j.gameserver.handler.itemhandlers;
 
 import net.sf.l2j.gameserver.datatables.SkillTable;
 import net.sf.l2j.gameserver.handler.IItemHandler;
-import net.sf.l2j.gameserver.model.L2Character;
 import net.sf.l2j.gameserver.model.L2ItemInstance;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
@@ -94,7 +93,7 @@ public class EnergyStone implements IItemHandler
 				L2Skill dummy = SkillTable.getInstance().getInfo(_skill.getId(), _skill.getLevel());
 				if (dummy != null)
 				{
-					dummy.getEffects((L2Character) null, activeChar);
+					dummy.getEffects(activeChar, activeChar);
 					activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
 					return;
 				}

+ 1 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2BoatInstance.java

@@ -316,7 +316,7 @@ public class L2BoatInstance extends L2Character
 		m._yDestination = y;
 		m._zDestination = z; // this is what was requested from client
 		m._heading = 0; // initial value for coordinate sync
-		
+		m.onGeodataPathIndex = -1; // Initialize not on geodata path
 		m._moveStartTime = GameTimeController.getGameTicks();
 		
 		if (Config.DEBUG)

+ 5 - 0
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

@@ -8422,6 +8422,11 @@ public final class L2PcInstance extends L2PlayableInstance
 			}
 			else if (getCurrentSkill() != null && !getCurrentSkill().isCtrlPressed() && skill.isOffensive())
 			{
+				if(getClan() != null && ((L2PcInstance)target).getClan() != null)
+				{
+					if(getClan().isAtWarWith(((L2PcInstance)target).getClan().getClanId()) && ((L2PcInstance)target).getClan().isAtWarWith(getClan().getClanId()))
+						return true; // in clan war player can attack whites even without ctrl
+				}
 				if (
 						((L2PcInstance)target).getPvpFlag() == 0 &&             //   target's pvp flag is not set and
 						((L2PcInstance)target).getKarma() == 0                  //   target has no karma

+ 7 - 1
L2_GameServer/java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java

@@ -60,12 +60,18 @@ public class ValidatePosition extends L2GameClientPacket
     @Override
 	protected void runImpl()
     {
-        L2PcInstance activeChar = getClient().getActiveChar();
+    	L2PcInstance activeChar = getClient().getActiveChar();
         if (activeChar == null || activeChar.isTeleporting()) return;
 
         int realX = activeChar.getX();
         int realY = activeChar.getY();
         int realZ = activeChar.getZ();
+
+        if (_x == 0 && _y == 0) 
+        {
+        	if (realX != 0) // in this case this seems like a client error
+        		return;
+        }
         
         if(activeChar.getParty() != null && activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)
         {