All pastes #452073 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-22 01:11 UTC
rendered paste body
Index: Level3.cpp
===================================================================
--- Level3.cpp	(revision 3498)
+++ Level3.cpp	(working copy)
@@ -315,6 +315,75 @@
 
     return true;
 }
+const char *profSpellList[] =
+{
+	// Artisan professions
+	"9786",
+	"10249",
+	"10663",
+	"10769",
+	"10847",
+	"11612",
+	"11994",
+	"12181",
+	"12657",
+	"13921",
+	"18249",
+	"18261",
+	"19887",
+	"19890",
+	"19902",
+	"28899",
+	"34093",
+	// Expert professions
+	"2552",
+	"3465",
+	"3539",
+	"3568",
+	"3571",
+	"3812",
+	"3913",
+	"4041",
+	"7416",
+	"7736",
+	"7925",
+	"8620",
+	"19886",
+	"19889",
+	"19903",
+	"28896",
+	"34092",
+	// Apprentice professions
+	"2020",
+	"2155",
+	"2275",
+	"2372",
+	"2551",
+	"2581",
+	"3279",
+	"3911",
+	"4039",
+	"7414",
+	"7733",
+	"8615",
+	"25245",
+	"33389",
+	// Journeyman professions
+	"2021",
+	"2154",
+	"2280",
+	"2373",
+	"2582",
+	"3280",
+	"3412", 
+	"3912", 
+	"4040",
+	"7415",
+	"7734", 
+	"8619",
+	"25246", 
+	"33392"
+};
 
 const char *gmSpellList[] =
 {
@@ -951,6 +1020,29 @@
         return true;
     }
 
+	if (!strcmp(args, "all_prof"))
+	{
+		int loop = 0;
+
+		PSendSysMessage(LANG_LEARNING_PROFESSIONS, m_session->GetPlayer()->GetName());
+
+		while (strcmp(profSpellList[loop], "0"))
+		{
+			uint32 spell = atol((char*)profSpellList[loop]);
+			if (m_session ->GetPlayer()->HasSpell(spell))
+			{
+				loop++;
+				continue;
+			}
+			m_session->GetPlayer()->learnSpell((uint16)spell);
+
+			loop++;
+
+		}
+
+		return true;
+	}
+
     if (!strcmp(args, "all_myclass"))
     {
         PSendSysMessage(LANG_COMMAND_LEARNINGSPSK, m_session->GetPlayer()->GetName());