The trick is to be able to store the dynamic mapid, and the standard mapid in the same variable (I use a uint). On checks such as wether it should be seen or not, etc etc, you check the dynamic mapid. When sending location and such to the client, you send the standard mapid, and so on.
I'm not about to release a fully working structure for this, as it'll probably wind up getting used wrong like most codes do
Code:
[StructLayout(LayoutKind.Sequential, Size=4)]
public struct MAP_ID
{
// ...
public override int GetHashCode()
{
return (int)Value;
}
public override bool Equals(object obj)
{
if (obj is MAP_ID)
return ((MAP_ID)obj) == this;
else if (obj is uint)
return ((uint)obj) == this;
return obj.Equals(this);
}
public override string ToString()
{
return Value.ToString();
}
}
The TQ servers, if you examine the memory of the client, while in an un-instanced map you have two numbers being the same(such as TC = 1002). If you were in a map such as Basi/AS/Serps etc, you'd have the static map ip and then the instanced map ID.
I'm not sure why anyone would code their server to not support dynamic maps. After all, they're required on official servers for mines, houses, jail etc.
You should simply have a database, linking a map_id (dynamic), to the static game_map_id (from gamemap.dat), along with any extra information, such as music, weather, minimap, flags and time etc. You work with the dynamic ID for everything on the server, but always send the static ID to the client.
Atually pete your correct, the only use for dynamic maps in conquer to-date has been houses.
Jail, mines and the pk tourny maps are all duplicated and fully mapped maps.
Check again on those mines. The server does actually send the map_id, aswell as the game_map_id. The same mine isn't duplicated for PC, Ape, Desert all over.
but the non 1002 ( tc still ) doesn't it just had the twin city
the other one is for weekly and monthly PK event in real CO, there is this for DC and AC; unsure about PC though.
The Dynamic maps thing is something i need to get to grips with, i wanna take the house kind of thing and turn it into some kind of team dungeon (like WoW)
Dynamic DNS 04/10/2010 - Metin2 Private Server - 6 Replies Hallo, ich finde in meiner FritzBox keine Dynamic DNS option kann jemand helfen ?
[Request] CoLauncher for dynamic ip for 5065 09/12/2009 - CO2 Programming - 2 Replies can someone make a co launcher that like this one....
pls i really need it to go non hamachi :|
Dynamic IP 08/08/2009 - Dekaron Private Server - 1 Replies so i aksed this question in a few threads but i'm afraid it will get missed plus i figured this topic could benefit from it's own thread. what i'm trying to do is make my server public. but since i have a dynamic ip from my ISP it would mean i would have to provide everyone playing with a new loginlist and chanlist file every time my IP changed. so i made an account over at myddns.com but the client does not seem to like using whatever.myddns.com as the address it needs to connect to...any way...
[TUT REQUEST] Dynamic Memory Editing via dll injection 01/09/2008 - General Coding - 2 Replies Hi there
im trying to edit the memory of a game via dll injection .. but the adresses arent static, they are dynamic, what means that they change every restart.. and i dont know how to edit dynamic adresses with a dll injection.. could anyone post a tutorial how i could do that??
thanks beforehand
greetz eMale
dynamic DNS 01/30/2007 - WoW Private Server - 0 Replies several DDNS services can be updated from within the router running DD-WRT. The adventurous can load bits from other WRT projects for other DDNS services
there's no need to run update software from the PC OS (ex dyndns)
http://DD-WRT.com