diff options
author | alexichi <alexbankai96@gmail.com> | 2016-05-10 18:34:22 +0200 |
---|---|---|
committer | alexichi <alexbankai96@gmail.com> | 2016-05-10 18:34:22 +0200 |
commit | 162b1de442bae3f02f14771eeb5f4f32868a97b3 (patch) | |
tree | 3426fdb07b631690d28619c570139244803e5763 /js/dungeon.js | |
parent | 2f32bc3153b7f2c2561e4603f912573921e6449f (diff) | |
download | candybox-162b1de442bae3f02f14771eeb5f4f32868a97b3.tar.gz candybox-162b1de442bae3f02f14771eeb5f4f32868a97b3.tar.bz2 candybox-162b1de442bae3f02f14771eeb5f4f32868a97b3.tar.xz candybox-162b1de442bae3f02f14771eeb5f4f32868a97b3.zip |
continue the use of objects problem
Diffstat (limited to 'js/dungeon.js')
-rw-r--r-- | js/dungeon.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/js/dungeon.js b/js/dungeon.js index 2921c7d..7d97b49 100644 --- a/js/dungeon.js +++ b/js/dungeon.js @@ -69,6 +69,11 @@ function strike(ret,nb, f){ persoLife--; document.getElementById("lifePerso").innerHTML = parseInt(persoLife); } + data.hp=persoLife; + sendRequest("craftmine.php", "op=updatePerso&hp="+data.hp+"&maxHP="+data.maxHP+"&xp="+data.xp+"&lv="+data.level+"&power="+data.power + +"&bonusPower="+data.bonusPower, function(){ + displayPerso(data.hp,data.maxHP,data.xp,data.level,data.power,data.bonusPower); + }); battle(ret,nb,f); } @@ -94,7 +99,8 @@ function endBattle(v,nb, f, ret){ displayExit(); sendRequest("craftmine.php", "op=sendDungeonProgress&floor="+f+"&mob="+nb); } - sendRequest("craftmine.php", "op=updatePerso&hp="+data.hp+"&maxHP="+data.maxHP+"&xp="+data.xp+"&lv="+data.level+"&power="+data.power+"&bonusPower="+data.bonusPower, function(){ + sendRequest("craftmine.php", "op=updatePerso&hp="+data.hp+"&maxHP="+data.maxHP+"&xp="+data.xp+"&lv="+data.level+"&power="+data.power + +"&bonusPower="+data.bonusPower, function(){ displayPerso(data.hp,data.maxHP,data.xp,data.level,data.power,data.bonusPower); }); } |