Page 1 of 1

ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 12:43 am
by elcotek
I work currently on ToA and have fixed the Zonepoints for correct work :wink:
Now port an Player to right Realm and back of DB entry Realm i have it testet on ML9 and Cetus !


Here my changes:
Code: Select all
namespace DOL.GS.PacketHandler.Client.v168
{
[PacketHandler(PacketHandlerType.TCP, eClientPackets.PlayerRegionChangeRequest, ClientStatus.PlayerInGame)]
public class PlayerRegionChangeRequestHandler : IPacketHandler
{
/// <summary>
/// Defines a logger for this class.
/// </summary>
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

/// <summary>
/// Holds jump point types
/// </summary>
protected readonly Hashtable m_instanceByName = new Hashtable();

#region IPacketHandler Members

public int HandlePacket(GameClient client, GSPacketIn packet)
{
ushort jumpSpotID = packet.ReadShort();

eRealm targetRealm = client.Player.Realm;

if (client.Player.CurrentRegion.Expansion == (int)eClientExpansion.TrialsOfAtlantis)
{
//Fixed by Elcotek now jump to rigth Realm ID from Zone DB testet on ML9 // if we are in TrialsOfAtlantis then base the target jump on the current region realm instead of the players realm
targetRealm = client.Player.Realm; //targetRealm = client.Player.CurrentZone.GetRealm();
}

var zonePoint =
GameServer.Database.SelectObject<ZonePoint>("`Id` = '" + jumpSpotID + "' AND (`Realm` = '" + (byte)targetRealm +
"' OR `Realm` = '0' OR `Realm` = NULL)");

if (zonePoint == null)
{
client.Out.SendMessage("Invalid Jump : [" + jumpSpotID + "]", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return 1;
}
And here the Patch for lastet Dol Version:



Greetings Elcotek (Schnitte)

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 3:10 am
by Tolakram
Hi,

thanks for wanting to fix this, but I disagree with the fix or the need to fix it. :)

- // if we are in TrialsOfAtlantis then base the target jump on the current region realm instead of the players realm
- targetRealm = client.Player.CurrentZone.GetRealm();
+ //Fixed by Elcotek now jump to rigth Realm ID from Zone DB testet on ML9
+ targetRealm = client.Player.Realm; //targetRealm = client.Player.CurrentZone.GetRealm();

On a true RvR server the player should never be able to get outside his realm, so always using the players current zone realm will work. On a cooperative server, or a hybrid server like Storm, players can choose what realm to go to, and the above fix will always send them back to their own realm, which is what the previous fix is trying to avoid.

Can you explain what the problem is that needed fixed?

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 7:44 am
by elcotek
Hm,

ok we need seperate Realm Zones for Toa Dungeons, the only Dungeon for all Realms its ML10 this its like live i think. :wink:
I have it testet, player will after change this, right port to own realm Region from realm entry on Zone db.

On my RvR server will no work i can say...
Im mean right in and backport:
ID130 = Hibernia
ID30 = Midgard
ID73 = Albion


Sorry for my bad english :oops:

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 11:16 am
by Tolakram
I have it testet, player will after change this, right port to own realm Region from realm entry on Zone db.
That is correct, they will, but how did they get to the wrong realm in the first place? On an RvR server they should always be in their own realm.

The code has to support RvR, PvE and PvP. Only RvR should force the player to stay in their own realm.

ML10 is a new issues. I'm not sure where they will port when trying to leave ML10.

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 11:51 am
by elcotek
Such as, on an RvR server:

Player port from Region 130 hib in an Toa Dungeon eg. ML9 and port back to wrong 30 Midgard Toa Region, is this ok ? :oops:

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 12:09 pm
by Tolakram
Such as, on an RvR server:

Player port from Region 130 hib in an Toa Dungeon eg. ML9 and port back to wrong 30 Midgard Toa Region, is this ok ? :oops:
No :) That is an error in your zone table. Get the latest zone table from the public DB release, it has all the fixes I made a few months ago.

Re: ToA Zonepoint Patch

PostPosted: Sat Aug 14, 2010 4:57 pm
by elcotek
Ok thanks,
i will test with fresh compilled source code, my db seems ok it work with the changes from me. :?


Thanke you for Answers:)