ToA Zonepoint Patch

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

ToA Zonepoint Patch

Postby elcotek » Sat Aug 14, 2010 12:43 am

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)
Attachments
Toa_zonepoint_Patch.patch
(975 Bytes) Downloaded 29 times
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: ToA Zonepoint Patch

Postby Tolakram » Sat Aug 14, 2010 3:10 am

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?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: ToA Zonepoint Patch

Postby elcotek » Sat Aug 14, 2010 7:44 am

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:
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: ToA Zonepoint Patch

Postby Tolakram » Sat Aug 14, 2010 11:16 am

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.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: ToA Zonepoint Patch

Postby elcotek » Sat Aug 14, 2010 11:51 am

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:
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: ToA Zonepoint Patch

Postby Tolakram » Sat Aug 14, 2010 12:09 pm

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.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: ToA Zonepoint Patch

Postby elcotek » Sat Aug 14, 2010 4:57 pm

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:)
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 179
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest