diff --git a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php index 98dee522d..a13123fd7 100644 --- a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php +++ b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersController.php @@ -14,10 +14,18 @@ public function __construct() { public function loadHome() { if ($_SERVER["REQUEST_METHOD"] == "POST") { - $this->saveCharacterOrder(); - ?> -

Character settings succesfully saved.

- resetCharacterOrder(); + ?> +

Character order reset successfully.

+ saveCharacterOrder(); + ?> +

Character settings succesfully saved.

+ getAcoreAccountId(); @@ -38,6 +46,16 @@ public function getView() { return $this->view; } + private function resetCharacterOrder() { + $accId = ACoreServices::I()->getAcoreAccountId(); + $conn = ACoreServices::I()->getCharacterEm()->getConnection(); + $stmt = $conn->prepare( + "UPDATE `characters` SET `order` = NULL WHERE `account` = ? AND `deleteDate` IS NULL" + ); + $stmt->bindValue(1, $accId); + $stmt->executeQuery(); + } + private function saveCharacterOrder() { if (!isset($_POST) || !isset($_POST["characterorder"])) { return; diff --git a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php index 12d98ae34..3ca170abc 100644 --- a/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php +++ b/src/acore-wp-plugin/src/Components/CharactersMenu/CharactersView.php @@ -2,6 +2,8 @@ namespace ACore\Components\CharactersMenu; +use ACore\Utils\AcoreCharColors; + class CharactersView { private $controller; @@ -16,44 +18,47 @@ public function __construct($controller) { public function getHomeRender($characters) { ob_start(); wp_enqueue_style('bootstrap-css', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', array(), '5.1.3'); - wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.1'); + wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.5'); wp_enqueue_script('bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', array(), '5.1.3'); wp_enqueue_script('jquery-ui-sortable'); ?>
-

Characters Settings

-

Check some details and configure of your characters.

-
-

Order

-

Change the order in which the characters appear in your in-game character selection screen.

+

Order Character Screen

+

Change the order in which the characters appear in your in-game character selection screen, by dragging them, matches in-game position.


+ -
    - +
      +
    • -
    - +
    + + +
@@ -62,12 +67,23 @@ public function getHomeRender($characters) {
- - acore_db_world_name; $itemQuery = "SELECT mi.`mail_id`, ii.`itemEntry`, ii.`count`, - it.`name` AS item_name + it.`name` AS item_name, it.`Quality` AS item_quality FROM `mail_items` mi JOIN `item_instance` ii ON mi.`item_guid` = ii.`guid` JOIN `$worldDb`.`item_template` it ON ii.`itemEntry` = it.`entry` diff --git a/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php b/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php index 5a882e5c2..74af3c7ed 100644 --- a/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php +++ b/src/acore-wp-plugin/src/Components/MailReturnMenu/MailReturnView.php @@ -2,6 +2,8 @@ namespace ACore\Components\MailReturnMenu; +use ACore\Utils\AcoreCharColors; + class MailReturnView { @@ -17,58 +19,80 @@ public function getMailReturnRender($chars) ob_start(); wp_enqueue_style('bootstrap-css', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', array(), '5.1.3'); - wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.1'); + wp_enqueue_style('acore-css', ACORE_URL_PLG . 'web/assets/css/main.css', array(), '0.5'); wp_enqueue_script('bootstrap-js', '//cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', array(), '5.1.3'); wp_enqueue_script('jquery'); - wp_enqueue_script('acore-mail-return-js', ACORE_URL_PLG . 'web/assets/mail-return/mail-return.js', array('jquery'), null, true); + wp_enqueue_script('power-js', 'https://wow.zamimg.com/widgets/power.js', array(), null, false); + wp_enqueue_script('acore-mail-return-js', ACORE_URL_PLG . 'web/assets/mail-return/mail-return.js', array('jquery'), '2.3', true); + wp_localize_script('acore-mail-return-js', 'mailReturnData', [ + 'mailsUrl' => rest_url(ACORE_SLUG . '/v1/mail-return/list'), + 'returnUrl' => rest_url(ACORE_SLUG . '/v1/mail-return'), + 'assetsUrl' => ACORE_URL_PLG . 'web/assets/', + 'nonce' => wp_create_nonce('wp_rest'), + ]); ?> -
-
-
-
-

Mail Return

-

You can return sent mails that have not yet been read by the recipient in this page. Select the character, the sent mail and hit return.

-
- - - - -