mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Implement STACK_EXPERIENCE_GAIN_PERCENT bonus
Suggested on Discord - implements STACK_EXPERIENCE_GAIN_PERCENT that modifies stack experience received by units after combat - removed "EXPERIENCE" primary skill. Changes to experience are now applied through separate netpack
This commit is contained in:
@@ -122,7 +122,18 @@ void ApplyClientNetPackVisitor::visitSetResources(SetResources & pack)
|
||||
callInterfaceIfPresent(cl, pack.player, &IGameEventsReceiver::receivedResource);
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitSetPrimSkill(SetPrimSkill & pack)
|
||||
void ApplyClientNetPackVisitor::visitSetHeroExperience(SetHeroExperience & pack)
|
||||
{
|
||||
const CGHeroInstance * h = cl.gameInfo().getHero(pack.id);
|
||||
if(!h)
|
||||
{
|
||||
logNetwork->error("Cannot find hero with pack.id %d", pack.id.getNum());
|
||||
return;
|
||||
}
|
||||
callInterfaceIfPresent(cl, h->tempOwner, &IGameEventsReceiver::heroExperienceChanged, h, pack.val);
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitSetPrimarySkill(SetPrimarySkill & pack)
|
||||
{
|
||||
const CGHeroInstance * h = cl.gameInfo().getHero(pack.id);
|
||||
if(!h)
|
||||
|
||||
Reference in New Issue
Block a user