[Fix] Exp in the Exp Gained event was wrong.
This commit is contained in:
parent
ed3eabb7e7
commit
5c2330c16b
@ -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>
|
||||||
|
@ -18,11 +18,7 @@ Game::~Game(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user