Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2008, 09:06 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

I know it's not 100% perfect, but this is how we did it (same type of approach that Angelox was talking about). I hardcoded a list of city zones, and if you're not a caster, you cannot bind or be bound outside of those zones (note: this list only goes up to luclin - but since our server is Old World only, it's overkill for us ).

Anyway, it could be easily expanded upon if anyone was interested in using it.

Currently, it says:
If the zone is not listed as "CanBind" in the zones table, then you cannot bind (unless you're a GM).
If the zone isn't in the hardcoded list of cities, and you're not a caster, then you cannot bind (unless you're a GM).
Otherwise, you can bind.

It's not beautiful, and I would like to clean it up and put it into the database, but honestly, it gets its job done, so I haven't messed with it. If anyone else wants to use it, be my guest.

Dax

./zone/zone.h
Code:
void	SetGraveyard(int32 zoneid, int32 x, int32 y, int32 z, int32 heading);
	bool	IsCity(int32 zoneid); //Lieka Edit:  Put in for melee binding rules
./zone/zone.cpp
Code:
	void Zone::SetGraveyard(int32 zoneid, int32 x, int32 y, int32 z, int32 heading) {
	pgraveyard_zoneid = zoneid;
	pgraveyard_x = x;
	pgraveyard_y = y;
	pgraveyard_z = z;
	pgraveyard_heading = heading;
}
	bool Zone::IsCity(int32 zoneid) {
	if ((zoneid == 1) || //South Qeynos
		(zoneid == 2) || //North Qeynos
		(zoneid == 3) || //Surefall Glade
		(zoneid == 8) || //North Freeport
		(zoneid == 9) || //West Freeport
		(zoneid == 10) || //East Freeport
		(zoneid == 19) || //Rivervale
		(zoneid == 23) || //Erudin Palace
		(zoneid == 24) || //Erudin
		(zoneid == 29) || //Halas
		(zoneid == 40) || //Neriak Foreign Quarter
		(zoneid == 41) || //Neriak Commons
		(zoneid == 42) || //Neriak Third Gate
		(zoneid == 45) || //Qeynos Aqueduct Systems
		(zoneid == 49) || //Oggok
		(zoneid == 52) || //Grobb
		(zoneid == 54) || //Greateer Faydark
		(zoneid == 55) || //Ak`Anon
		(zoneid == 60) || //South Kaladim
		(zoneid == 61) || //Northern Felwithe
		(zoneid == 62) || //Southern Felwithe
		(zoneid == 67) || //Northern Kaladim
		(zoneid == 75) || //Paineel
		(zoneid == 82) || //Cabilis West
		(zoneid == 83) || //Swamp of No Hope
		(zoneid == 106) || //Cabilis East
		(zoneid == 155)) { //The City of Shar Vahl
			return true;
	} else {
			return false;
	}
}

./zone/spell_effects.cpp
Code:
			case SE_BindAffinity:
			{
#ifdef SPELL_EFFECT_SPAM
				snprintf(effect_desc, _EDLEN, "Bind Affinity");
#endif
				if (IsClient())
				{
					if((!zone->CanBind() && !CastToClient()->GetGM())){
						Message(13, "It would be very difficult for anyone to form an affinity with this area.");
						break;
				} else if ( ((!zone->IsCity(zone->GetZoneID())) && ((GetClass() != DRUID) && (GetClass() != CLERIC) && (GetClass() != SHAMAN) && (GetClass() != WIZARD) && (GetClass() != ENCHANTER) && (GetClass() != MAGICIAN) && (GetClass() != NECROMANCER)) && !CastToClient()->GetGM())){
						Message(13, "You cannot form an affinity with this area.  Try a city.");
						break;
					} else {
						CastToClient()->SetBindPoint();
						Save();
					}
				}
				break;
			}
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #2  
Old 04-16-2008, 09:38 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

As ugly as it is, it's also a clever workaround. Though, I bet it wouldn't be hard to add a new column to zone and get rid of the hardcoding. I'll give that shot and see what I come up. I just got done merging your new MQ2 detection system into TGC's code (it looks perfect, I just need to clean up those 700 zone_points *sigh*) and was about to test it out... until I saw this post. Not sure if I should thank you or curse you :P
Reply With Quote
  #3  
Old 04-16-2008, 10:43 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

Haha, you're welcome and I'm sorry.

Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #4  
Old 04-17-2008, 11:45 AM
BatCountry
Fire Beetle
 
Join Date: Mar 2006
Posts: 24
Default

I think pre-Velious they had support for regions of zones being unbindable.

This may be faulty recollection, but I remember having to get bound right up against the wall on one corner of OT's city keep because I was KOS there and had screwed up my FV faction hunting those faerie dragon things.

If I recall correctly, I had just about enough time to squat, memorize SoW, cast it on myself, and run like hell before a patrolling guard ganked me after I died.
Reply With Quote
  #5  
Old 04-17-2008, 02:04 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

bad bad bad code.
cuase it forcefuly hinders melee classes.
If we must have melee binding restriction - I much rather have an extra collumn like cavedude said
what we realy could use is a confirmation box when person is been bound, so evil casters do not bind melees say in VT
under Aten Ha Ra feet
Reply With Quote
  #6  
Old 04-17-2008, 02:54 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Why is it bad? I have it up on TGC right now (though, I did add the db column, I'll diff that and post later) and it's fine for the most part. Melee toons can only be bound in city zones, this code does preciously that.

I don't see a need for a confirmation box, it isn't Live Like, you have to be grouped with the caster to be bound by them, and since they can only be bound in cities, there is no real way to exploit bind affinity... Now, sacrifice and rez on the other hand... those could use confirmation boxes.
Reply With Quote
  #7  
Old 04-17-2008, 03:39 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Quote:
Originally Posted by cavedude View Post
Why is it bad? I have it up on TGC right now (though, I did add the db column, I'll diff that and post later) and it's fine for the most part. Melee toons can only be bound in city zones, this code does preciously that.

I don't see a need for a confirmation box, it isn't Live Like, you have to be grouped with the caster to be bound by them, and since they can only be bound in cities, there is no real way to exploit bind affinity... Now, sacrifice and rez on the other hand... those could use confirmation boxes.
didn't you read my argument with Angelox?
Melee bind restriction SUCK and unfair.
And hard coding of this into main code is horible cause this kills server admin options of NOT having this stupid live-like feature.

As far as beein a in group - nothing prevents a jerk groupmate to bind you in some legaly bindable place where you kos if he is mad with you

thats why melee bind column and bidn confirmation box is good, and hard coding is BAD.

PS.
and for the GOD SAKE people - the stop treating "LIVE" like a freaken holy bible, where every word is divine and every statement is unquestionable!
Its not!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:03 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3