[Fix] Exp in the Exp Gained event was wrong.

This commit is contained in:
root 2012-02-01 20:38:23 +02:00
parent ed3eabb7e7
commit 5c2330c16b
4 changed files with 5 additions and 9 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.4.0, 2012-02-01T20:01:14. -->
<!-- Written by Qt Creator 2.4.0, 2012-02-01T20:34:36. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@ -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);

View File

@ -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;

View File

@ -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);