From 5c2330c16bd0c93954557e46d55a3812828db4cd Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Feb 2012 20:38:23 +0200 Subject: [PATCH] [Fix] Exp in the Exp Gained event was wrong. --- Unuk-QT/Unuk-QT.pro.user | 2 +- src/Unuk/Game.cpp | 8 ++------ src/Unuk/Player.cpp | 2 +- src/libUnuk/LevelGen/LevelGen.cpp | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Unuk-QT/Unuk-QT.pro.user b/Unuk-QT/Unuk-QT.pro.user index 5e42dc6..98fe72b 100644 --- a/Unuk-QT/Unuk-QT.pro.user +++ b/Unuk-QT/Unuk-QT.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/src/Unuk/Game.cpp b/src/Unuk/Game.cpp index a7efd55..382c306 100644 --- a/src/Unuk/Game.cpp +++ b/src/Unuk/Game.cpp @@ -17,12 +17,8 @@ Game::~Game(void) { //delete _player; } -gameNavVal_t Game::Run(const string savegameIDArg) { - int spawnX; - int spawnY; - _map.FindSpawnPoint(spawnX, spawnY); - - _player->SetXY(spawnX*64, spawnY*64); +gameNavVal_t Game::Run(const string savegameIDArg) { + _player->SetXY(400, 400); _player->LoadSprites("../Data/Media/Images/Characters/Player.png", 40, 45); LoadSavegame(savegameIDArg); diff --git a/src/Unuk/Player.cpp b/src/Unuk/Player.cpp index eeb5ab5..0444940 100644 --- a/src/Unuk/Player.cpp +++ b/src/Unuk/Player.cpp @@ -120,7 +120,7 @@ void Player::SetLevel(int level) { void Player::SetExp(int exp) { std::stringstream evtMsg; - evtMsg << "Gained " << exp << " Experience Points."; + evtMsg << "Gained " << (exp - _exp) << " Experience Points."; eventHistory->LogEvent(evtMsg.str()); _exp += exp; diff --git a/src/libUnuk/LevelGen/LevelGen.cpp b/src/libUnuk/LevelGen/LevelGen.cpp index 19ec206..00d8e37 100644 --- a/src/libUnuk/LevelGen/LevelGen.cpp +++ b/src/libUnuk/LevelGen/LevelGen.cpp @@ -138,7 +138,7 @@ void LevelGen::Load(const string filename) { //FindSpawnPoint(spawnX, spawnY); //npc->SetXY(spawnX, spawnY); // try to uncomment this, try to find out what's going on.. --konom - npc->SetXY(100, 200); + npc->SetXY(100, 230); npc->LoadSprites("../Data/Media/Images/Characters/template.png", 40,45); _world.AddNPC(npc);