feat. Add option to Learn or cast spells (#30)
* feat. Add option to Learn or cast spells * boolean learn attribute
This commit is contained in:
parent
8e4aef41dc
commit
494cde182c
5 changed files with 104 additions and 69 deletions
|
|
@ -94,11 +94,16 @@ uint32 giveAward(Player* player)
|
|||
money += fields[1].Get<uint32>() * GOLD;
|
||||
}
|
||||
if (fields[2].Get<uint32>() > 0)
|
||||
player->CastSpell(player, fields[2].Get<uint32>());
|
||||
if (fields[3].Get<uint32>() > 0)
|
||||
player->AddItem(fields[3].Get<uint32>(), 1);
|
||||
if (fields[4].Get<uint32>())
|
||||
{
|
||||
if (fields[3].Get<uint32>() == 0)
|
||||
player->CastSpell(player, fields[2].Get<uint32>());
|
||||
else
|
||||
player->learnSpell(fields[2].Get<uint32>());
|
||||
}
|
||||
if (fields[4].Get<uint32>() > 0)
|
||||
player->AddItem(fields[4].Get<uint32>(), 1);
|
||||
if (fields[5].Get<uint32>())
|
||||
player->AddItem(fields[5].Get<uint32>(), 1);
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue