From 30e628de577e23f027e261d2ba0b8c9089e1a110 Mon Sep 17 00:00:00 2001
From: celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>
Date: Tue, 8 Mar 2005 10:03:33 +0000
Subject: [PATCH] git-svn-id:
 https://svn.code.sf.net/p/rathena/svn/branches/stable@1212
 54d463be-8e91-2dee-dedb-b68131a5f0ec

---
 Changelog-SVN.txt          |  5 ++++-
 conf-tmpl/maps_athena.conf |  5 +++++
 src/map/skill.c            | 25 +++++++++++++++++--------
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 300dacf55f..c22d8b3533 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,7 +1,10 @@
 Date	Added
 
 03/08
-        * Speedup inventory and storage saving, thanks to Ilpalazzo-sama [celest]
+        * Fixes Icewall can be directly cast on players and monsters -- also removes
+          the 'unsupported layout' message [celest]
+        * Added the new turbo_room and alde_tt to the maps config [celest]
+        * Speedup SQL inventory and storage saving, thanks to Ilpalazzo-sama [celest]
         * Reverted a jA change in event loading [celest]
 
 03/07
diff --git a/conf-tmpl/maps_athena.conf b/conf-tmpl/maps_athena.conf
index ca55480c2e..56c49a2c5e 100644
--- a/conf-tmpl/maps_athena.conf
+++ b/conf-tmpl/maps_athena.conf
@@ -541,6 +541,11 @@ map: yuno_fild09.gat
 map: yuno_fild11.gat
 map: yuno_fild12.gat
 
+// --- Race Arena ---
+// -- 2004-03-08sdata_k.gpf --
+map: alde_tt02.gat
+map: turbo_room.gat
+
 // Ragnarok World Championship 2004
 // Requires: RWC 2004 Client
 // or Akaru's SuperGRF 1.64 or newer
diff --git a/src/map/skill.c b/src/map/skill.c
index 6b95d391e2..3e657b0c5c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1692,16 +1692,25 @@ static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
 
 int skill_check_unit_range2(int m,int x,int y,int skillid, int skilllv)
 {
-	int c = 0;
-	int range = skill_get_unit_range(skillid);
-	int layout_type = skill_get_unit_layout_type(skillid,skilllv);
-	if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
-		printf("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
-		return 0;
+	int c = 0, range;
+	
+	switch (skillid) {	// to be expanded later
+	case WZ_ICEWALL:
+		range = 2;
+		break;
+	default:
+		{
+			int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+			if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+				printf("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
+				return 0;
+			}
+			// �Ƃ肠���������`�̃��j�b�g���C�A�E�g�̂ݑΉ�
+			range = skill_get_unit_range(skillid) + layout_type;
+		}
+		break;
 	}
 
-	// �Ƃ肠���������`�̃��j�b�g���C�A�E�g�̂ݑΉ�
-	range += layout_type;
 	map_foreachinarea(skill_check_unit_range2_sub,m,
 			x-range,y-range,x+range,y+range,0,&c,skillid);