diff --git a/res/app.js b/res/app.js
index 9ba0b1f..1409ad2 100755
--- a/res/app.js
+++ b/res/app.js
@@ -381,7 +381,7 @@ $(document).ready(function () {
return "/saveCharacter.php?cmd=" + cmd + "&name=" + name + "&value=" + value + "&filePath=" + filePath;
}
- $(".charform input[name='Difficulty'], .charform .skill, #CharacterName, #CharacterClass, #CharacterLevel, #CharacterClass").change(function () {
+ $(".charform input[name='Difficulty'], .charform .skill, #CharacterName, #CharacterClass, #CharacterLevel, #CharacterClass, .stats input").change(function () {
var name = $(this).attr("name");
var newValue = $(this).val();
diff --git a/saveCharacter.php b/saveCharacter.php
index 3b6be2f..32f23dd 100644
--- a/saveCharacter.php
+++ b/saveCharacter.php
@@ -231,13 +231,76 @@ switch ($cmd) {
$char->setChar("Difficulty", $value);
echo "Handling Difficulty command - Difficulty: $value, File Path: $filePath";
break;
-
+
// skills
case "skills":
//var_dump($char->cData);
$char->setSkill($name, $value);
echo "Handling skills command - Skill: $name, Value: $value, File Path: $filePath";
break;
+
+ // stats
+// Handle strength command
+ case "strength":
+ $char->setStat("strength", $value); // Set the "strength" stat to the provided value
+ echo "Handling strength command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the strength command
+ break;
+
+// Handle dexterity command
+ case "dexterity":
+ $char->setStat("dexterity", $value); // Set the "dexterity" stat to the provided value
+ echo "Handling dexterity command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the dexterity command
+ break;
+
+// Handle vitality command
+ case "vitality":
+ $char->setStat("vitality", $value); // Set the "vitality" stat to the provided value
+ echo "Handling vitality command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the vitality command
+ break;
+
+// Handle energy command
+ case "energy":
+ $char->setStat("energy", $value); // Set the "energy" stat to the provided value
+ echo "Handling energy command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the energy command
+ break;
+
+// Handle hitpoints command
+ case "hitpoints":
+ $char->setStat("hitpoints", $value); // Set the "hitpoints" stat to the provided value
+ echo "Handling hitpoints command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the hitpoints command
+ break;
+
+// Handle maxhp command
+ case "maxhp":
+ $char->setStat("maxhp", $value); // Set the "maxhp" stat to the provided value
+ echo "Handling maxhp command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the maxhp command
+ break;
+
+// Handle mana command
+ case "mana":
+ $char->setStat("mana", $value); // Set the "mana" stat to the provided value
+ echo "Handling mana command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the mana command
+ break;
+
+// Handle maxmana command
+ case "maxmana":
+ $char->setStat("maxmana", $value); // Set the "maxmana" stat to the provided value
+ echo "Handling maxmana command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the maxmana command
+ break;
+
+// Handle stamina command
+ case "stamina":
+ $char->setStat("stamina", $value); // Set the "stamina" stat to the provided value
+ echo "Handling stamina command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the stamina command
+ break;
+
+// Handle maxstamina command
+ case "maxstamina":
+ $char->setStat("maxstamina", $value); // Set the "maxstamina" stat to the provided value
+ echo "Handling maxstamina command - Value: $value, File Path: $filePath"; // Display a message indicating the handling of the maxstamina command
+ break;
+
+ // default command
default:
// Handle unknown command
echo "Unknown command: $cmd";
diff --git a/src/tabs/Chars.php b/src/tabs/Chars.php
index be2e2f2..d30d3cb 100644
--- a/src/tabs/Chars.php
+++ b/src/tabs/Chars.php
@@ -84,7 +84,6 @@ EOT;
$radio .= "
";
}
- $skills = '';
/*
'skills' =>
array (size=1)
@@ -100,13 +99,75 @@ EOT;
'col' => int 2
'icon' => int 0
*/
- $skillcounter = 1;
- foreach ($c->cData['skills']['skills'] as $k => $skill) {
- $skills .= ": {$skill['skill']}