mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Feature] Add Strings::BeginsWith() and Strings::EndsWith() (#3471)
* [Strings] Add Strings::BeginsWith() and Strings::EndsWith() # Notes - These are useful so that we don't have to manually calculate size or perform a substring. * Update questmgr.cpp * Update client.cpp
This commit is contained in:
@@ -9147,8 +9147,14 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
else if (inst->IsClassCommon())
|
||||
{
|
||||
if (!RuleB(Skills, RequireTomeHandin) && item->ItemType == EQ::item::ItemTypeSpell && (strstr((const char*)item->Name, "Tome of ") || strstr((const char*)item->Name, "Skill: ")))
|
||||
{
|
||||
if (
|
||||
!RuleB(Skills, RequireTomeHandin) &&
|
||||
item->ItemType == EQ::item::ItemTypeSpell &&
|
||||
(
|
||||
Strings::BeginsWith(item->Name, "Tome of ") ||
|
||||
Strings::BeginsWith(item->Name, "Skill: ")
|
||||
)
|
||||
) {
|
||||
DeleteItemInInventory(slot_id, 1, true);
|
||||
TrainDiscipline(item->ID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user