Finalized the mount system and the recently new skills/stats.

* Added mount options to the thing menu.
* Reworked the mounting/dismounting.
* Fixed up some skill module bugs.
* Added alerts to stats like health, mana, capacity, and regeneration time (need to revise this one as it currently has no maximum).
This commit is contained in:
BeniS
2012-08-21 00:28:19 +12:00
parent f4cc942c85
commit 1d20cc9e4b
8 changed files with 85 additions and 35 deletions

View File

@@ -53,7 +53,6 @@ void Game::resetGameStates()
m_online = false;
m_denyBotCall = false;
m_dead = false;
m_mounted = false;
m_serverBeat = 50;
m_seq = 0;
m_canReportBugs = false;
@@ -1079,7 +1078,6 @@ void Game::mount(bool mount)
return;
m_protocolGame->sendMountStatus(mount);
m_mounted = mount;
}
void Game::requestItemInfo(const ItemPtr& item, int index)

View File

@@ -251,7 +251,6 @@ public:
bool isDead() { return m_dead; }
bool isAttacking() { return !!m_attackingCreature; }
bool isFollowing() { return !!m_followingCreature; }
bool isMounted() { return m_mounted; }
ContainerPtr getContainer(int index) { return m_containers[index]; }
std::map<int, ContainerPtr> getContainers() { return m_containers; }
@@ -288,7 +287,6 @@ private:
bool m_online;
bool m_denyBotCall;
bool m_dead;
bool m_mounted;
int m_serverBeat;
uint m_seq;
Otc::FightModes m_fightMode;

View File

@@ -199,7 +199,6 @@ void OTClient::registerLuaFunctions()
g_lua.bindSingletonFunction("g_game", "isDead", &Game::isDead, &g_game);
g_lua.bindSingletonFunction("g_game", "isAttacking", &Game::isAttacking, &g_game);
g_lua.bindSingletonFunction("g_game", "isFollowing", &Game::isFollowing, &g_game);
g_lua.bindSingletonFunction("g_game", "isMounted", &Game::isMounted, &g_game);
g_lua.bindSingletonFunction("g_game", "getContainer", &Game::getContainer, &g_game);
g_lua.bindSingletonFunction("g_game", "getContainers", &Game::getContainers, &g_game);
g_lua.bindSingletonFunction("g_game", "getVips", &Game::getVips, &g_game);
@@ -380,6 +379,7 @@ void OTClient::registerLuaFunctions()
g_lua.bindClassMemberFunction<LocalPlayer>("setStates", &LocalPlayer::setStates);
g_lua.bindClassMemberFunction<LocalPlayer>("setSkill", &LocalPlayer::setSkill);
g_lua.bindClassMemberFunction<LocalPlayer>("setHealth", &LocalPlayer::setHealth);
g_lua.bindClassMemberFunction<LocalPlayer>("setTotalCapacity", &LocalPlayer::setTotalCapacity);
g_lua.bindClassMemberFunction<LocalPlayer>("setFreeCapacity", &LocalPlayer::setFreeCapacity);
g_lua.bindClassMemberFunction<LocalPlayer>("setExperience", &LocalPlayer::setExperience);
g_lua.bindClassMemberFunction<LocalPlayer>("setLevel", &LocalPlayer::setLevel);

View File

@@ -1465,7 +1465,7 @@ Outfit ProtocolGame::getOutfit(const InputMessagePtr& msg)
}
if(g_game.getFeature(Otc::GamePlayerMounts)) {
int mount = msg->getU16(); // mount
int mount = msg->getU16();
outfit.setMount(mount);
}