1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fighting with includes.

This commit is contained in:
Michał W. Urbańczyk
2008-07-02 08:39:56 +00:00
parent b0002ff50b
commit 1b73678b7c
19 changed files with 175 additions and 154 deletions

View File

@@ -13,6 +13,7 @@
#include "CAdvmapInterface.h"
#include "CPlayerInterface.h"
#include "hch/CBuildingHandler.h"
#include "hch/CObjectHandler.h"
LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
int CCallback::lowestSpeed(CGHeroInstance * chi)
@@ -783,17 +784,17 @@ int CCallback::battleGetStack(int pos)
return -1;
}
CStack CCallback::battleGetStackByID(int ID)
CStack* CCallback::battleGetStackByID(int ID)
{
for(int g=0; g<CGI->state->curB->stacks.size(); ++g)
{
if(CGI->state->curB->stacks[g]->ID == ID)
return *(CGI->state->curB->stacks[g]);
return CGI->state->curB->stacks[g];
}
return CStack();
return NULL;
}
CStack CCallback::battleGetStackByPos(int pos)
CStack* CCallback::battleGetStackByPos(int pos)
{
return battleGetStackByID(battleGetStack(pos));
}