Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spells] Adds a rule to allow right-click memorize from spell scrolls. #1377

Merged
merged 2 commits into from
Jun 11, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jun 6, 2021

Uses similar logic to disciplines with the hardcoded Tome: check and stuff, but with Spell: items here instead. Locked it behind a rule in case people don't want to use it.

@ghost ghost force-pushed the spell_scroll_scribe branch from 08075d2 to b215fb0 Compare June 6, 2021 05:49
@splose

This comment was marked as abuse.

@splose splose requested review from mackal and splose June 6, 2021 08:31
@splose splose removed the request for review from mackal June 6, 2021 08:50
return false;
}

if(!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily requesting changes here for this PR but converting the char array to a std::string would make it easy to do a string find and simplify the code a bit

Example

		std::string item_name = item->Name;
		if (item_name.find("Spell: ") != std::string::npos) {
			std::cout << "found!" << '\n';
		}

@@ -509,6 +509,87 @@ bool Client::TrainDiscipline(uint32 itemid) {
return(false);
}

bool Client::MemorizeSpellFromItem(uint32 item_id) {
const EQ::ItemData *item = database.GetItem(item_id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have used auto here; but the explicitness is good too

Copy link
Member

@Akkadius Akkadius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is really cool and something I'd be excited for running a custom server

@Akkadius Akkadius merged commit d54cd08 into master Jun 11, 2021
@ghost ghost deleted the spell_scroll_scribe branch June 12, 2021 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants