All pastes #452821 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-22 15:18 UTC
rendered paste body
Index: Language.h
===================================================================
--- Language.h	(revision 3498)
+++ Language.h	(working copy)
@@ -260,6 +260,7 @@
 
 #define LANG_INVALID_SKILL_ID            "Invalid skill id (%u)"
 #define LANG_LEARNING_GM_SKILLS          "%s - Learning default GM spells/skills."
+#define LANG_LEARNING_PROFESSIONS		 "%s - Learning all Profession Trainer Spells."
 #define LANG_KNOWN_SPELL                 "You already know that spell."
 #define LANG_UNKNOWN_SPELL               "%s don't know that spell."
 #define LANG_FORGET_SPELL                "You already forget that spell."
Index: Level3.cpp
===================================================================
--- Level3.cpp	(revision 3498)
+++ Level3.cpp	(working copy)
@@ -262,7 +262,6 @@
     SelectedPlayer->UpdateSkillsToMaxSkillsForLevel();
     return true;
 }
-
 bool ChatHandler::HandleSetSkillCommand(const char* args)
 {
     if (!*args)
@@ -315,6 +314,72 @@
 
     return true;
 }
+const char *profSpellList[] =
+{
+	"9786",
+	"10249",
+	"10663",
+	"10769",
+	"10847",
+	"11612",
+	"11994",
+	"12181",
+	"12657",
+	"13921",
+	"18249",
+	"18261",
+	"19887",
+	"19890",
+	"19902",
+	"28899",
+	"34093",
+	"2552",
+	"3465",
+	"3539",
+	"3568",
+	"3571",
+	"3812",
+	"3913",
+	"4041",
+	"7416",
+	"7736",
+	"7925",
+	"8620",
+	"19886",
+	"19889",
+	"19903",
+	"28896",
+	"34092",
+	"2020",
+	"2155",
+	"2275",
+	"2372",
+	"2551",
+	"2581",
+	"3279",
+	"3911",
+	"4039",
+	"7414",
+	"7733",
+	"8615",
+	"25245",
+	"33389",
+	"2021",
+	"2154",
+	"2280",
+	"2373",
+	"2582",
+	"3280",
+	"3412", 
+	"3912", 
+	"4040",
+	"7415",
+	"7734", 
+	"8619",
+	"25246", 
+	"33392",
+	"0"
+};
 
 const char *gmSpellList[] =
 {
@@ -699,7 +764,6 @@
     "8153",
     "9033",
     "9034",
-    //"9036", problems with ghost state
     "16421",
     "21653",
     "22660",
@@ -708,7 +772,6 @@
     "2426",
     "5916",
     "6634",
-    //"6718", phasing stealth, annoing for learn all case.
     "6719",
     "8822",
     "9591",
@@ -951,6 +1014,30 @@
         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());