|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |

06-14-2008, 03:58 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Thanks again - I'll be testing shortly, before you go, I was wanting to give you something else to think about which may be related to your work; The boats.
Only one of them is not fall through , the rest are , the most needed ship is the SirensBane (butcher > freeporte boat), and it is totally transparent. We actually have a fully functional system for boats to run on schedule dynamic zone or not. but really can't use it to its best or properly, unless we can get a boat thats not so large as the one we have now.
I'm about to make a detailed post on how we did this, but really, the SirensBane is very needed - it appears in many zones, and fits the areas perfectly.
|
 |
|
 |

06-21-2008, 03:10 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
This is a reply to Scorp from another thread where the subject of azone was brought up. Thought I would put the reply here rather than cluttering up the other thread, or starting a new one.
Quote:
Originally Posted by Scorpious2k
I hope you are including the code that makes it work under windows too.
Also as a future enhancement, we should see if we can get it to identify PvP areas like it does water. Then we could add code that makes those areas work. This probably deserves it's own thread in the appropriate forum area.
|
Yes, the new azone and also awater compile under windows. (awater has no new functionality, at present).
Regarding the PVP areas, I just logged into the old arena zone, and also went to the PVP arena in Freeport.
If you issue the #bestz command in the pvp part of the arena zone, it tells you you are in water. Likewise, in the pvp arena in Freeport, it tells you that you are in an unknown area, so it seems that these pvp areas are defined as special, but just not being handled correctly. I'll look into it some more.
Given that I can only pull out the special areas from S3Ds, and not EQGs. What other S3D zones have pvp areas (and where abouts in the zone are they) ?
Thanks
|
 |
|
 |

06-21-2008, 03:50 PM
|
 |
Demi-God
|
|
Join Date: Mar 2003
Location: USA
Posts: 1,067
|
|
Halas has one, and this may help: OpenZone can create them.
I have a zone I made with one, and can give you the file.
Because, OZ will successfully create the area (recognized by the client) you might want to either look at the OZ source or (probably quicker) ask Windcatcher about it.
EDIT...
My thought on this subject, btw, is that once we can identify the area and if a player and/or target is in it, we can add code to where it checks to see if attack is allowed against another player and allow/deny it depending on if they are in it.
Probably with a rule so the serverOp can turn it on or off. This would actually be a pretty simple add-on once we can determine the PvP area and a client's position in or out of it.
__________________
Maybe I should try making one of these servers...
Last edited by Scorpious2k; 06-21-2008 at 11:54 PM..
|
 |
|
 |

06-21-2008, 04:12 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Quote:
Originally Posted by Scorpious2k
you might want to either look at the OZ source or (probably quicker) ask Windcatcher about it.
|
I looked at the OpenZone source (which has helped me a lot in the past while
working with S3Ds) and also Windcatcher's WLD format document, and
the PVP areas should be defined in the S3D with a name beginning 'DRP_ZONE':
Quote:
0x29 — Region Flag — PLAIN
Notes
This fragment lets you flag certain regions (as defined by 0x22 BSP Region fragments) in a particular way.
The flagging is done by setting the name of this fragment to a particular “magic” value.
The possible values are:
WT_ZONE........................................... .....Flag all regions in the list as underwater regions.
LA_ZONE........................................... ......Flag all regions in the list as lava regions.
DRP_ZONE.......................................... ....Flag all regions in the list as PvP regions.
DRNTP##########_ZONE.............Flag all regions in the list as zone point regions.
The ####’s are actually numbers and hyphens that somehow tell the client the zone destination.
This method of setting zone points may or may not be obsolete.
|
|
 |
|
 |
 |
|
 |

06-22-2008, 08:25 AM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
I got the PVP areas figured out correctly. There are PVP areas in the following zones:
Arena, Cabwest, citymist, freportw, Kael, mischiefplane, neriaka, neriakb, paineel, qeynos, sseru, thurgadina
I could't find one in Halas. There is an area called 'The Pit Of Doom' which looks a bit like a mini-arena, but
there is nothing in the S3D file to flag it as such, and I don't get the client message when I go in there.
My ISP is doing maintenance which means my webspace is down at the moment, but when it comes back up I will post
the water maps for the zones above with the PVP areas tagged correctly.
I also wrote a patch for the server to detect the PVP areas (bool WaterMap::InPVPArea) and added some output into
the #bestz command to show whether you were in a PVP area or not, however it still requires someone to modify the
attack code to call InPVPArea to perform the check. (I'll let someone else do that).
Here is the zone patch. I'll post the maps later when my webspace is back up. The modified version of awater to
produce the .wtr maps tagged with PVP areas will come with my modified azone when that is done and tested.
Code:
diff -u --recursive /tmp/EQEmu-0.7.0-1115/zone/command.cpp ./command.cpp
--- /tmp/EQEmu-0.7.0-1115/zone/command.cpp 2008-06-19 13:49:00.000000000 +0100
+++ ./command.cpp 2008-06-22 12:25:18.000000000 +0100
@@ -6455,13 +6455,15 @@
RegionType = zone->watermap->BSPReturnRegionType(1, c->GetTarget()->GetX(), c->GetTarget()->GetY(), z);
c->Message(0,"InWater returns %d", zone->watermap->InWater(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z));
c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z));
+ c->Message(0,"InPVPArea returns %d", zone->watermap->InPVPArea(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z));
}
else {
z=c->GetZ();
RegionType = zone->watermap->BSPReturnRegionType(1, c->GetX(), c->GetY(),z);
c->Message(0,"InWater returns %d", zone->watermap->InWater(c->GetX(), c->GetY(), z));
- c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetX(), c->GetY(), z));
+ c->Message(0,"InLava returns %d", zone->watermap->InLava(c->GetX(), c->GetY(), z));
+ c->Message(0,"InPVPArea returns %d", zone->watermap->InPVPArea(c->GetX(), c->GetY(), z));
}
@@ -6469,6 +6471,10 @@
case RegionTypeNormal: { c->Message(0,"There is nothing special about the region you are in!"); break; }
case RegionTypeWater: { c->Message(0,"You/your target are in Water."); break; }
case RegionTypeLava: { c->Message(0,"You/your target are in Lava."); break; }
+ case RegionTypePVP: { c->Message(0,"You/your target are in a PVP area."); break; }
+ case RegionTypeSlime: { c->Message(0,"You/your target are in a Slime area."); break; }
+ case RegionTypeIce: { c->Message(0,"You/your target are in an Ice area."); break; }
+ case RegionTypeVWater: { c->Message(0,"You/your target are in a VWATER area."); break; }
default: c->Message(0,"You/your target are in an unknown region type.");
}
}
diff -u --recursive /tmp/EQEmu-0.7.0-1115/zone/watermap.cpp ./watermap.cpp
--- /tmp/EQEmu-0.7.0-1115/zone/watermap.cpp 2008-01-14 02:42:37.000000000 +0000
+++ ./watermap.cpp 2008-06-22 12:22:12.000000000 +0100
@@ -99,6 +99,12 @@
return(BSPReturnRegionType(1, y, x, z) == RegionTypeLava);
}
+bool WaterMap::InPVPArea(float y, float x, float z) const {
+ if(BSP_Root == NULL) {
+ return false;
+ }
+ return(BSPReturnRegionType(1, y, x, z) == RegionTypePVP);
+}
WaterMap* WaterMap::LoadWaterMapfile(const char* in_zonename, const char *directory) {
FILE *fp;
diff -u --recursive /tmp/EQEmu-0.7.0-1115/zone/watermap.h ./watermap.h
--- /tmp/EQEmu-0.7.0-1115/zone/watermap.h 2008-01-14 02:42:37.000000000 +0000
+++ ./watermap.h 2008-06-22 12:21:19.000000000 +0100
@@ -30,15 +30,21 @@
} ZBSP_Node;
#pragma pack()
+
typedef enum {
RegionTypeUnsupported = -2,
RegionTypeUntagged = -1,
RegionTypeNormal = 0,
RegionTypeWater = 1,
RegionTypeLava = 2,
- RegionTypeZoneLine = 3
+ RegionTypeZoneLine = 3,
+ RegionTypePVP = 4,
+ RegionTypeSlime = 5,
+ RegionTypeIce = 6,
+ RegionTypeVWater =7
} WaterRegionType;
+
class WaterMap {
public:
@@ -46,6 +52,7 @@
WaterRegionType BSPReturnRegionType(long node_number, float y, float x, float z) const;
bool InWater(float y, float x, float z) const;
bool InLava(float y, float x, float z) const;
+ bool InPVPArea(float y, float x, float z) const;
WaterMap();
~WaterMap();
|
 |
|
 |

06-22-2008, 11:16 AM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Here are the 'Water' maps for the zones I mentioned in the previous post with the PVP regions tagged (1.4MB):
http://www.rama.demon.co.uk/pvpmaps.tar.gz
The directory in the tar file is called pvpmaps but that is just a temp directory I put them in while creating the archive.
Once you have extracted them, drop them in your Maps directory where the other .wtr files are.
|
 |
|
 |

06-22-2008, 12:03 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
I had a look at what would be involved to use this to enable PVP combat in the PVP areas, and it looks to be simpler than I thought, i.e. just change the existing GetPVP() function:
Code:
--- /tmp/EQEmu-0.7.0-1115/zone/client.h 2008-06-15 00:07:57.000000000 +0100
+++ client.h 2008-06-22 16:50:45.000000000 +0100
@@ -36,6 +36,7 @@
#include "mob.h"
#include "npc.h"
#include "zone.h"
+#include "watermap.h"
#include "AA.h"
#include "../common/seperator.h"
#include "../common/Item.h"
@@ -275,7 +276,7 @@
void SetGM(bool toggle);
void SetPVP(bool toggle);
- inline bool GetPVP() const { return zone->GetZoneID() == 77 ? true : m_pp.pvp; }
+ inline bool GetPVP() const { return zone->watermap->InPVPArea(x_pos, y_pos, z_pos) ? true : m_pp.pvp; }
inline bool GetGM() const { return (bool) m_pp.gm; }
inline void SetBaseClass(uint32 i) { m_pp.class_=i; }
Previously this would let you PVP anywhere in zone 77 (arena), but with this change it will only allow it in the central PVP area.
|
 |
|
 |

06-22-2008, 12:22 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Quote:
Originally Posted by Derision
Here are the 'Water' maps for the zones I mentioned in the previous post with the PVP regions tagged (1.4MB):
http://www.rama.demon.co.uk/pvpmaps.tar.gz
The directory in the tar file is called pvpmaps but that is just a temp directory I put them in while creating the archive.
Once you have extracted them, drop them in your Maps directory where the other .wtr files are.
|
I'll put these maps on Rathe forums downloads also
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:06 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |