1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Stacks #3 -> towards new system of stack operations.

This commit is contained in:
Michał W. Urbańczyk
2010-11-27 20:17:28 +00:00
parent 7c3f3d20c3
commit fdb541d81e
13 changed files with 339 additions and 187 deletions

View File

@@ -122,6 +122,40 @@ void SetAvailableHeroes::applyCl( CClient *cl )
//TODO: inform interface?
}
void ChangeStackCount::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(sl.army->tempOwner,garrisonChanged,sl.army);
}
void SetStackType::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(sl.army->tempOwner,garrisonChanged,sl.army);
}
void EraseStack::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(sl.army->tempOwner,garrisonChanged,sl.army);
}
void SwapStacks::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(sl1.army->tempOwner,garrisonChanged,sl1.army);
if(sl1.army != sl2.army)
INTERFACE_CALL_IF_PRESENT(sl2.army->tempOwner,garrisonChanged,sl2.army);
}
void InsertNewStack::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(sl.army->tempOwner,garrisonChanged,sl.army);
}
void RebalanceStacks::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(src.army->tempOwner,garrisonChanged,src.army);
if(src.army != dst.army)
INTERFACE_CALL_IF_PRESENT(dst.army->tempOwner,garrisonChanged,dst.army);
}
void GiveBonus::applyCl( CClient *cl )
{
switch(who)