Closed ottml closed 1 year ago
@Flow86 What's up with Jenkins?
@Flow86 What's up with Jenkins?
some of the packages seem to be broken, I'll try to renovate the pipeline (to get a newer cross compiler etc) but this will take a while
In the gameworld.cpp file the lua onAttack event is added to the GameWorld::Attack, if I understand the code correctly this is only for land attacks and there's a seperate method / function to do sea attacks, the GameWorld::AttackViaSea the lua event seems to be missing from there.
I could misinterpret the code, but I think adding the code below after line 836 should do the trick (could be something I missed for the harbour instead of building)
if(counter > 0 && HasLua())
{
GetLua().EventAttack(player_attacker, attacked_building->GetPlayer(), counter );
}
In the gameworld.cpp file the lua onAttack event is added to the GameWorld::Attack, if I understand the code correctly this is only for land attacks and there's a seperate method / function to do sea attacks, the GameWorld::AttackViaSea the lua event seems to be missing from there.
I could misinterpret the code, but I think adding the code below after line 836 should do the trick (could be something I missed for the harbour instead of building)
if(counter > 0 && HasLua()) { GetLua().EventAttack(player_attacker, attacked_building->GetPlayer(), counter ); }
Added the missing call to seaAttack too.
@Flow86 Can you review and approve and merge if everything is okay. Thanks
Fixes #1176