[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"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!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> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@ -17,12 +17,8 @@ Game::~Game(void) {
//delete _player; //delete _player;
} }
gameNavVal_t Game::Run(const string savegameIDArg) { gameNavVal_t Game::Run(const string savegameIDArg) {
int spawnX; _player->SetXY(400, 400);
int spawnY;
_map.FindSpawnPoint(spawnX, spawnY);
_player->SetXY(spawnX*64, spawnY*64);
_player->LoadSprites("../Data/Media/Images/Characters/Player.png", 40, 45); _player->LoadSprites("../Data/Media/Images/Characters/Player.png", 40, 45);
LoadSavegame(savegameIDArg); LoadSavegame(savegameIDArg);

View File

@ -120,7 +120,7 @@ void Player::SetLevel(int level) {
void Player::SetExp(int exp) { void Player::SetExp(int exp) {
std::stringstream evtMsg; std::stringstream evtMsg;
evtMsg << "Gained " << exp << " Experience Points."; evtMsg << "Gained " << (exp - _exp) << " Experience Points.";
eventHistory->LogEvent(evtMsg.str()); eventHistory->LogEvent(evtMsg.str());
_exp += exp; _exp += exp;

View File

@ -138,7 +138,7 @@ void LevelGen::Load(const string filename) {
//FindSpawnPoint(spawnX, spawnY); //FindSpawnPoint(spawnX, spawnY);
//npc->SetXY(spawnX, spawnY); // try to uncomment this, try to find out what's going on.. --konom //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); npc->LoadSprites("../Data/Media/Images/Characters/template.png", 40,45);
_world.AddNPC(npc); _world.AddNPC(npc);