View Single Post
  #3  
Old 04-15-2008, 09:36 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Diff for those interested:

Code:
Index: zone.h
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/zone.h,v
retrieving revision 1.22
diff -u -r1.22 zone.h
--- zone.h	21 Feb 2008 10:01:42 -0000	1.22
+++ zone.h	15 Apr 2008 11:53:44 -0000
@@ -171,6 +171,8 @@
 	void	weatherSend();
 	bool	CanBind() const { return(can_bind); }
 	bool	CanDoCombat() const { return(can_combat); }
+	bool	CanLevitate() const {return(can_levitate); } // Magoth78
+	bool    CanCastOutdoor() const {return(can_castoutdoor);} //qadar
 	
 	time_t	weather_timer;
 	int8	weather_type;
@@ -206,6 +208,8 @@
 	int32	pMaxClients;
 	bool	can_bind;
 	bool	can_combat;
+	bool    can_castoutdoor; //qadar
+	bool	can_levitate; //Magoth78
 	int32	pgraveyard_id, pgraveyard_zoneid;
 	float	pgraveyard_x, pgraveyard_y, pgraveyard_z, pgraveyard_heading;
 	
Index: zonedb.h
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/zonedb.h,v
retrieving revision 1.10
diff -u -r1.10 zonedb.h
--- zonedb.h	3 Nov 2007 10:01:39 -0000	1.10
+++ zonedb.h	15 Apr 2008 11:52:54 -0000
@@ -159,7 +159,7 @@
 	/*
 	 * Zone related
 	 */
-	bool GetZoneCFG(int32 zoneid, NewZone_Struct *data, bool &can_bind, bool &can_combat);
+	bool GetZoneCFG(int32 zoneid, NewZone_Struct *data, bool &can_bind, bool &can_combat, bool &can_levitate, bool &can_castoutdoor);; //Magoth78 - qadar
 	bool	SaveZoneCFG(int32 zoneid,NewZone_Struct* zd);
 	bool	DumpZoneState();
 	sint8	LoadZoneState(const char* zonename, LinkedList<Spawn2*>& spawn2_list);
Index: spells.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/spells.cpp,v
retrieving revision 1.54
diff -u -r1.54 spells.cpp
--- spells.cpp	26 Feb 2008 05:01:41 -0000	1.54
+++ spells.cpp	15 Apr 2008 16:49:52 -0000
@@ -1221,6 +1221,38 @@
 	if(!IsValidSpell(spell_id))
 		return false;
 
+// qadar start
+
+if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor())
+    {
+       if( IsClient() )
+        {
+            if(!CastToClient()->GetGM())
+            {
+                Message(13, "You can't cast this spell indoors.");
+			    return false;
+            }
+        }
+    }
+
+// qadar end
+
+// angelox start
+
+if( IsEffectInSpell(spell_id, SE_Levitate) && !zone->CanLevitate() )
+    {
+        if( IsClient() )
+        {
+            if(!CastToClient()->GetGM())
+            {
+                Message(13, "You can't levitate in this zone.");
+			    return false;
+            }
+        }
+    }
+
+//angelox end
+
 	if
 	(
 		this->IsClient() && 
Index: zone.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/zone.cpp,v
retrieving revision 1.27
diff -u -r1.27 zone.cpp
--- zone.cpp	21 Feb 2008 10:01:42 -0000	1.27
+++ zone.cpp	15 Apr 2008 11:51:40 -0000
@@ -902,9 +902,10 @@
 	LogFile->write(EQEMuLog::Status, "Zone Static Data Reloaded.");
 }
 
+
 bool Zone::LoadZoneCFG(const char* filename, bool DontLoadDefault) {
 	memset(&newzone_data, 0, sizeof(NewZone_Struct));
-	if(!database.GetZoneCFG(database.GetZoneID(filename), &newzone_data, can_bind, can_combat)) {
+	if(!database.GetZoneCFG(database.GetZoneID(filename), &newzone_data, can_bind, can_combat, can_levitate, can_castoutdoor)) {  // Magoth78 - qadar
 		cout << "Error while loading Zone Config!\n";
 		cout << "IF YOU HAVENT DONE SO, SOURCE THE ZONECFG.SQL FILE!!!!!!\n";
 		return false;
Index: zonedb.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/zonedb.cpp,v
retrieving revision 1.9
diff -u -r1.9 zonedb.cpp
--- zonedb.cpp	9 Apr 2008 09:01:55 -0000	1.9
+++ zonedb.cpp	15 Apr 2008 11:52:26 -0000
@@ -74,8 +74,9 @@
 	safe_delete_array(query);
 	return true;
 }
-
-bool ZoneDatabase::GetZoneCFG(int32 zoneid, NewZone_Struct *zone_data, bool &can_bind, bool &can_combat) {
+// Magoth78 start
+// qadar start
+bool ZoneDatabase::GetZoneCFG(int32 zoneid, NewZone_Struct *zone_data, bool &can_bind, bool &can_combat, bool &can_levitate, bool &can_castoutdoor) {
 	char errbuf[MYSQL_ERRMSG_SIZE];
 	char *query = 0;
 	MYSQL_RES *result;
@@ -88,7 +89,7 @@
 		"fog_red3,fog_green3,fog_blue3,fog_minclip3,fog_maxclip3,"
 		"fog_red4,fog_green4,fog_blue4,fog_minclip4,fog_maxclip4,"
 		"sky,zone_exp_multiplier,safe_x,safe_y,safe_z,underworld,"
-		"minclip,maxclip,time_type,canbind,cancombat"
+		"minclip,maxclip,time_type,canbind,cancombat,canlevitate,castoutdoor"
 		" from zone where zoneidnumber=%i",zoneid), errbuf, &result)) {
 		safe_delete_array(query);
 		while((row = mysql_fetch_row(result))) {
@@ -119,6 +120,8 @@
 			
 			can_bind = atoi(row[r++])==0?false:true;
 			can_combat = atoi(row[r++])==0?false:true;
+            can_levitate = atoi(row[r++])==0?false:true;
+		can_castoutdoor = atoi(row[r++])==0?false:true;
 			
 			good = true;
 		}
@@ -132,7 +135,8 @@
 	
 	return(good);
 }
-
+// Magoth78 end
+// qadar end
 void ZoneDatabase::UpdateSpawn2Timeleft(int32 id, int32 timeleft)
 {
 	char errbuf[MYSQL_ERRMSG_SIZE];

Last edited by cavedude; 04-15-2008 at 09:09 PM..
Reply With Quote