bind more needs for battle window

This commit is contained in:
AndreFaramir 2012-02-08 11:05:31 -02:00
parent aff8c7717e
commit b56a7e3029
2 changed files with 7 additions and 0 deletions

View File

@ -171,6 +171,8 @@ void LocalPlayer::setAttackingCreature(const CreaturePtr& creature)
creature->showStaticSquare(Fw::red);
m_attackingCreature = creature;
}
g_lua.callGlobalField("Game", "onSetAttackingCreature", creature);
}
void LocalPlayer::setFollowingCreature(const CreaturePtr& creature)

View File

@ -121,13 +121,18 @@ void OTClient::registerLuaFunctions()
g_lua.bindClassMemberFunction<Creature>("getId", &Creature::getId);
g_lua.bindClassMemberFunction<Creature>("getName", &Creature::getName);
g_lua.bindClassMemberFunction<Creature>("getHealthPercent", &Creature::getHealthPercent);
g_lua.bindClassMemberFunction<Creature>("getSkull", &Creature::getSkull);
g_lua.bindClassMemberFunction<Creature>("getShield", &Creature::getShield);
g_lua.bindClassMemberFunction<Creature>("getEmblem", &Creature::getEmblem);
g_lua.bindClassMemberFunction<Creature>("setOutfit", &Creature::setOutfit);
g_lua.bindClassMemberFunction<Creature>("getOutfit", &Creature::getOutfit);
g_lua.bindClassMemberFunction<Creature>("setSkullTexture", &Creature::setSkullTexture);
g_lua.bindClassMemberFunction<Creature>("setShieldTexture", &Creature::setShieldTexture);
g_lua.bindClassMemberFunction<Creature>("setEmblemTexture", &Creature::setEmblemTexture);
g_lua.bindClassMemberFunction<Creature>("showStaticSquare", &Creature::showStaticSquare);
g_lua.bindClassMemberFunction<Creature>("hideStaticSquare", &Creature::hideStaticSquare);
g_lua.bindClassMemberFunction<Creature>("asMonster", &Creature::asMonster);
g_lua.bindClassMemberFunction<Creature>("asNpc", &Creature::asNpc);
g_lua.registerClass<Item, Thing>();
g_lua.bindClassStaticFunction<Item>("create", &Item::create);