Преглед изворни кода

* Some fixes to the previous commit (apparently it didn't compile with VS 2008)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13785 54d463be-8e91-2dee-dedb-b68131a5f0ec
Playtester пре 16 година
родитељ
комит
4e49aad859
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      src/map/skill.c

+ 4 - 3
src/map/skill.c

@@ -3320,12 +3320,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case SA_MONOCELL:
 		if (dstmd)
 		{
-			if ( dstmd->status.mode&MD_BOSS )
+			int class_;
+			if ( sd && dstmd->status.mode&MD_BOSS )
 			{
 				clif_skill_fail(sd,skillid,0,0);
 				break;
 			}
-			int class_ = skillid==SA_MONOCELL?1002:mob_get_random_id(2, 1, 0);
+			class_ = skillid==SA_MONOCELL?1002:mob_get_random_id(2, 1, 0);
 			clif_skill_nodamage(src,bl,skillid,skilllv,1);
 			mob_class_change(dstmd,class_);
 			if( tsc && dstmd->status.mode&MD_BOSS )
@@ -3339,7 +3340,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 		}
 		break;
 	case SA_DEATH:
-		if ( dstmd && dstmd->status.mode&MD_BOSS )
+		if ( sd && dstmd && dstmd->status.mode&MD_BOSS )
 		{
 			clif_skill_fail(sd,skillid,0,0);
 			break;