Browse Source

Exposed max level argument to ResortSpellBook, still need to allow filtering by max lvl

work in progress for issue #48
Image 4 years ago
parent
commit
e3a8597f78

+ 2 - 1
EQ2/source/WorldServer/Commands/Commands.cpp

@@ -2711,7 +2711,8 @@ void Commands::Process(int32 index, EQ2_16BitString* command_parms, Client* clie
 				int32 sort_by = atoul(sep->arg[1]); // 0 - alpha, 1 - level, 2 - category
 				int32 order = atoul(sep->arg[2]); // 0 - ascending, 1 - descending
 				int32 pattern = atoul(sep->arg[3]); // 0 - zigzag, 1 - down, 2 - across
-				client->GetPlayer()->ResortSpellBook(sort_by, order, pattern, book);
+				int32 maxlvlonly = atoul(sep->arg[4]); // 0 - zigzag, 1 - down, 2 - across
+				client->GetPlayer()->ResortSpellBook(sort_by, order, pattern, maxlvlonly, book);
 				ClientPacketFunctions::SendSkillSlotMappings(client);
 			}
 			else

+ 1 - 1
EQ2/source/WorldServer/Player.cpp

@@ -2011,7 +2011,7 @@ void Player::RemoveSpellBookEntry(int32 spell_id, bool remove_passives_from_list
 	MSpellsBook.unlock();
 }
 
-void Player::ResortSpellBook(int32 sort_by, int32 order, int32 pattern, int32 book_type)
+void Player::ResortSpellBook(int32 sort_by, int32 order, int32 pattern, int32 maxlvl_only, int32 book_type)
 {
 	//sort_by : 0 - alpha, 1 - level, 2 - category
 	//order : 0 - ascending, 1 - descending

+ 1 - 1
EQ2/source/WorldServer/Player.h

@@ -687,7 +687,7 @@ public:
 	void				SetPendingCollectionReward(Collection *collection) { pending_collection_reward = collection; }
 	Collection *		GetPendingCollectionReward() { return pending_collection_reward; }
 	void RemoveSpellBookEntry(int32 spell_id, bool remove_passives_from_list = true);
-	void ResortSpellBook(int32 sort_by, int32 order, int32 pattern, int32 book_type);
+	void ResortSpellBook(int32 sort_by, int32 order, int32 pattern, int32 maxlvl_only, int32 book_type);
 
 	static bool SortSpellEntryByName(SpellBookEntry* s1, SpellBookEntry* s2);
 	static bool SortSpellEntryByCategory(SpellBookEntry* s1, SpellBookEntry* s2);