Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when aprove deny a character #5

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4556ae0
Update to last version of PHP, some parts fixed.
masterking32 Nov 10, 2018
0c86a6b
More convert to MySQLi & some bugs fixed.
masterking32 Nov 16, 2018
3953381
Change default port for mysql to 3306
masterking32 Nov 16, 2018
084c3da
Add update for chardump addon, fix more parts.
masterking32 Nov 16, 2018
9091482
More fix errors.
masterking32 Nov 16, 2018
d9aa5d5
Cancel, Deny, Resend now available.
masterking32 Nov 16, 2018
5f048c5
fixed approve & deny
masterking32 Nov 16, 2018
8f2f3d9
README.md updated.
masterking32 Nov 16, 2018
afdd963
Fix more errors for LearnSeparateSpell function. Readme file updated.
masterking32 Nov 24, 2018
5fb022b
Core patch updated.
masterking32 Nov 24, 2018
21d52bc
Fix wrong function use.
masterking32 Nov 24, 2018
098ffb6
Characters SQL error's fixed.
masterking32 Nov 25, 2018
272b336
Copyright updated, some UI changes, Screenshot added.
masterking32 Nov 25, 2018
e43b007
UI Update, Readme updated, more screenshot added.
masterking32 Nov 25, 2018
9bdad4c
Fix problems for Insert character & Step 2
masterking32 Nov 25, 2018
900bccb
Readme Update.
masterking32 Nov 25, 2018
aec2601
SOAP function updated.
masterking32 Nov 25, 2018
a899ed1
Update readme.md
masterking32 Nov 25, 2018
25e0388
README.md update
masterking32 Nov 25, 2018
a267709
Add message for approve & deny
masterking32 Nov 25, 2018
160ee47
Login password check fixed.
masterking32 Nov 25, 2018
a1c9f83
fix unset
masterking32 Nov 25, 2018
f253c2e
fix invalid itemid send.
masterking32 Nov 25, 2018
7510104
Some code edits.
masterking32 Nov 25, 2018
f71e4f5
Update README.md
masterking32 Mar 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,52 @@
END OF THIS SYSTEM LIFE :
========

[USE OUR NEW MIGRATION SYSTEM](https://github.com/masterking32/WoWMigration)

Character Migration Tool
========

v12 >> WOTLK (3.3.5a) >> WOTLK (3.3.5a)

Translated to Spanish, English, French, German and Russian.

![alt tag](http://i.imgur.com/EgguVzo.png "Migration")
Screenshots
========
[![login form](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/login.jpg)](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/userpanel-1.jpg)[![User Panel 1](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/userpanel-1.jpg)](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/import-step1.jpg)[![login form](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/import-step1.jpg)](https://raw.githubusercontent.com/masterking32/web-character-migration-tool/master/Screenshots/import-step1.jpg)


Requeriments
========

PHP 5.3.X and MySQL 5.1.X
PHP >= 5.3.X and MySQL >= 5.1.X / MariaDB

PHP: enable SOAP module

World Server: enable SOAP module

How to Install
========

Import SQL files to your databases, Inside "SQL+Core's Commit".

Config file "core/init.php" and "_transfer/t_config.php"

In your database Table, 'account_transfer_blacklist' you can edit or add some servers to your transfer black list.

More information and other items: ZoneWoW.com
How to Install Addon
========

Download chardump.zip & extract it in your wow game folder. It should looks like ( D:\wotlk\Interface\AddOns\chardump )

Login in game with account, and enable addon.

While in game, simply write in chat /chardump --> It will generate your character dump file.

When the process is done. Chardump is located in your wow folder D:\wotlk\WTF\Account\YourAccount\SavedVariables\chardump.lua

Go on Migration website, write account details and upload Chardump.lua file ---> DONE!

What is new?
========
Updated to support last version of PHP (5.3-7.x).

Desch
Fixed all bugs up to AzerothCore rev d34e5329dfe6df44143219b3b9521610ee142ce2.
91 changes: 18 additions & 73 deletions SQL+Core's Commit/at_login.patch
Original file line number Diff line number Diff line change
@@ -1,83 +1,28 @@
# HG changeset patch
# User RDC
# Date 1356205970 0
# Node ID 3723de555d1d2ec33dbb683323b8e6f0159ee38b
# Parent 99600389f95783ee9e00aa95084f084f99d981d2
Character Migration Tool
src/server/game/Handlers/CharacterHandler.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff -r 99600389f957 -r 3723de555d1d src/server/game/Entities/Player/Player.h
--- a/src/server/game/Entities/Player/Player.h Sat Dec 22 18:00:05 2012 +0000
+++ b/src/server/game/Entities/Player/Player.h Sat Dec 22 19:52:50 2012 +0000
@@ -506,7 +506,8 @@
AT_LOGIN_RESET_PET_TALENTS = 0x10,
AT_LOGIN_FIRST = 0x20,
AT_LOGIN_CHANGE_FACTION = 0x40,
- AT_LOGIN_CHANGE_RACE = 0x80
+ AT_LOGIN_CHANGE_RACE = 0x80,
+ AT_LOGIN_UPDATE_NAME = 0x100
};

typedef std::map<uint32, QuestStatusData> QuestStatusMap;
diff -r 99600389f957 -r 3723de555d1d src/server/game/Handlers/CharacterHandler.cpp
--- a/src/server/game/Handlers/CharacterHandler.cpp Sat Dec 22 18:00:05 2012 +0000
+++ b/src/server/game/Handlers/CharacterHandler.cpp Sat Dec 22 19:52:50 2012 +0000
@@ -988,6 +988,22 @@

if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST))
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 284a8eb..20c363d 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1090,6 +1090,20 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder)
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST)) {
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
+ if(pCurrChar->HasAtLoginFlag(AT_LOGIN_UPDATE_NAME))

+ if(pCurrChar->HasAtLoginFlag(AT_LOGIN_RENAME))
+ {
+// sWorld->UpdateCharacterNameData(pCurrChar->GetGUIDLow() );
+ std::string nameUpdate_AT_LOGIN_UPDATE_NAME;
+ QueryResult result = CharacterDatabase.PQuery("SELECT name FROM characters WHERE `guid` = '%u'", pCurrChar->GetGUIDLow());
+ uint32 accID_Update_AT_LOGIN_UPDATE_NAME;
+ QueryResult result = CharacterDatabase.PQuery("SELECT name,account FROM characters WHERE `guid` = '%u'", pCurrChar->GetGUIDLow());
+ if(result)
+ {
+ //sLog->outErrorDb("SHIT!@ %u", pCurrChar->GetGUIDLow());
+ nameUpdate_AT_LOGIN_UPDATE_NAME = (*result)[0].GetString();
+ sWorld->UpdateCharacterNameData(pCurrChar->GetGUIDLow(), nameUpdate_AT_LOGIN_UPDATE_NAME);
+ sWorld->AddCharacterNameData(pCurrChar->GetGUIDLow(), nameUpdate_AT_LOGIN_UPDATE_NAME, pCurrChar->getGender(), pCurrChar->getRace(), pCurrChar->getClass(), pCurrChar->getLevel());
+ accID_Update_AT_LOGIN_UPDATE_NAME = (*result)[1].GetUInt32();
+ sWorld->UpdateGlobalPlayerData(pCurrChar->GetGUIDLow(), PLAYER_UPDATE_DATA_NAME, nameUpdate_AT_LOGIN_UPDATE_NAME, pCurrChar->getLevel(), pCurrChar->getGender(),pCurrChar->getRace(), pCurrChar->getClass());
+ sWorld->AddGlobalPlayerData(pCurrChar->GetGUIDLow(), accID_Update_AT_LOGIN_UPDATE_NAME, nameUpdate_AT_LOGIN_UPDATE_NAME, pCurrChar->getGender(), pCurrChar->getRace(), pCurrChar->getClass(), pCurrChar->getLevel(), 0, 0);
+ }
+// if(!sWorld->UpdateCharacterNameData(pCurrChar->GetGUIDLow(), pCurrChar->GetName(), pCurrChar->getGender(), pCurrChar->getRace()))
+// sWorld->AddCharacterNameData(pCurrChar->GetGUIDLow(), pCurrChar->GetName(), pCurrChar->getGender(), pCurrChar->getRace(), pCurrChar->getClass());
+ pCurrChar->RemoveAtLoginFlag(AT_LOGIN_UPDATE_NAME);
+ pCurrChar->RemoveAtLoginFlag(AT_LOGIN_RENAME);
+ }

// show time before shutdown if shutdown planned.
if (sWorld->IsShuttingDown())
diff -r 99600389f957 -r 3723de555d1d src/server/game/World/World.cpp
--- a/src/server/game/World/World.cpp Sat Dec 22 18:00:05 2012 +0000
+++ b/src/server/game/World/World.cpp Sat Dec 22 19:52:50 2012 +0000
@@ -3080,11 +3080,11 @@
data.m_level = level;
}

-void World::UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender /*= GENDER_NONE*/, uint8 race /*= RACE_NONE*/)
+bool World::UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender /*= GENDER_NONE*/, uint8 race /*= RACE_NONE*/)
{
std::map<uint32, CharacterNameData>::iterator itr = _characterNameDataMap.find(guid);
if (itr == _characterNameDataMap.end())
- return;
+ return false;

itr->second.m_name = name;

@@ -3093,6 +3093,7 @@

if (race != RACE_NONE)
itr->second.m_race = race;
+ return true;
}

void World::UpdateCharacterNameDataLevel(uint32 guid, uint8 level)
diff -r 99600389f957 -r 3723de555d1d src/server/game/World/World.h
--- a/src/server/game/World/World.h Sat Dec 22 18:00:05 2012 +0000
+++ b/src/server/game/World/World.h Sat Dec 22 19:52:50 2012 +0000
@@ -730,7 +730,7 @@

CharacterNameData const* GetCharacterNameData(uint32 guid) const;
void AddCharacterNameData(uint32 guid, std::string const& name, uint8 gender, uint8 race, uint8 playerClass, uint8 level);
- void UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender = GENDER_NONE, uint8 race = RACE_NONE);
+ bool UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender = GENDER_NONE, uint8 race = RACE_NONE);
void UpdateCharacterNameDataLevel(uint32 guid, uint8 level);
void DeleteCharaceterNameData(uint32 guid) { _characterNameDataMap.erase(guid); }
sScriptMgr->OnFirstLogin(pCurrChar);
}

6 changes: 3 additions & 3 deletions SQL+Core's Commit/update_auth.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE `account_transfer` (
`cAccount` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`cRealm` INT(2) UNSIGNED NOT NULL DEFAULT 1,
`date_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_checked` TIMESTAMP DEFAULT 0,
`date_checked` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`oPassword` CHAR(40) NOT NULL DEFAULT '',
`oAccount` CHAR(16) NOT NULL DEFAULT '',
`oServer` TEXT,
Expand Down Expand Up @@ -58,7 +58,7 @@ CREATE TABLE `account_transfer_queue` (
PRIMARY KEY (`id`)
) ENGINE=MYISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `account_transfer_guid`;
/*DROP TABLE IF EXISTS `account_transfer_guid`;
CREATE TABLE `account_transfer_guid` (
`Realm1` INT(11) NOT NULL DEFAULT 0,
`Realm2` INT(11) NOT NULL DEFAULT 0,
Expand All @@ -68,5 +68,5 @@ CREATE TABLE `account_transfer_guid` (
) ENGINE=MYISAM DEFAULT CHARSET=utf8;
-- DO NOT TOUCH THAT!
INSERT INTO `account_transfer_guid` VALUES (0, 0, 0, 0, 0);
-- Delete not existed gm acccess
-- Delete not existed gm acccess*/
DELETE FROM `account_access` WHERE `id` NOT IN (SELECT `id` FROM `account`);
7 changes: 4 additions & 3 deletions SQL+Core's Commit/update_characters.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@


INSERT INTO `characters` (`guid`,`account`,`name`,`race`,`class`,`gender`,`level`,`xp`,`money`,`playerBytes`,`playerBytes2`,`playerFlags`,`position_x`,`position_y`,`position_z`,`map`,`instance_id`,`instance_mode_mask`,`orientation`,`taximask`,`online`,`cinematic`,`totaltime`,`leveltime`,`logout_time`,`is_logout_resting`,`rest_bonus`,`resettalents_cost`,`resettalents_time`,`trans_x`,`trans_y`,`trans_z`,`trans_o`,`transguid`,`extra_flags`,`stable_slots`,`at_login`,`zone`,`death_expire_time`,`taxi_path`,`arenaPoints`,`totalHonorPoints`,`todayHonorPoints`,`yesterdayHonorPoints`,`totalKills`,`todayKills`,`yesterdayKills`,`chosenTitle`,`knownCurrencies`,`watchedFaction`,`drunk`,`health`,`power1`,`power2`,`power3`,`power4`,`power5`,`power6`,`power7`,`latency`,`speccount`,`activespec`,`exploredZones`,`equipmentCache`,`ammoId`,`knownTitles`,`actionBars`,`deleteInfos_Account`,`deleteInfos_Name`,`deleteDate`) VALUES
(1000000,1,'CTrigger1',7,8,1,80,0,2137455906,0,0,0,'5804.86','626.041','647.644',571,0,0,0,'0 0 0 0 0 0 0 0 0 0 0 0 0 0',0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,4395,0,NULL,25,31685,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,NULL,NULL,0,NULL,0,NULL,NULL,NULL),
(2000000,1,'CTrigger2',7,8,1,80,0,2137455906,0,0,0,'5804.86','626.041','647.644',571,0,0,0,'0 0 0 0 0 0 0 0 0 0 0 0 0 0',0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,4395,0,NULL,25,31685,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,NULL,NULL,0,NULL,0,NULL,NULL,NULL);
/* INSERT INTO `characters` (`guid`,`account`,`name`,`race`,`class`,`gender`,`level`,`xp`,`money`,`playerFlags`,`position_x`,`position_y`,`position_z`,`map`,`instance_id`,`instance_mode_mask`,`orientation`,`taximask`,`online`,`cinematic`,`totaltime`,`leveltime`,`logout_time`,`is_logout_resting`,`rest_bonus`,`resettalents_cost`,`resettalents_time`,`trans_x`,`trans_y`,`trans_z`,`trans_o`,`transguid`,`extra_flags`,`stable_slots`,`at_login`,`zone`,`death_expire_time`,`taxi_path`,`arenaPoints`,`totalHonorPoints`,`todayHonorPoints`,`yesterdayHonorPoints`,`totalKills`,`todayKills`,`yesterdayKills`,`chosenTitle`,`knownCurrencies`,`watchedFaction`,`drunk`,`health`,`power1`,`power2`,`power3`,`power4`,`power5`,`power6`,`power7`,`latency`,`exploredZones`,`equipmentCache`,`ammoId`,`knownTitles`,`actionBars`,`deleteInfos_Account`,`deleteInfos_Name`,`deleteDate`) VALUES
(1000000,1,'CTrigger1',7,8,1,80,0,2137455906,0,'5804.86','626.041','647.644',571,0,0,0,'0 0 0 0 0 0 0 0 0 0 0 0 0 0',0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,4395,0,NULL,25,31685,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,0,NULL,0,NULL,NULL,NULL),
(2000000,1,'CTrigger2',7,8,1,80,0,2137455906,0,'5804.86','626.041','647.644',571,0,0,0,'0 0 0 0 0 0 0 0 0 0 0 0 0 0',0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,4395,0,NULL,25,31685,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,0,NULL,0,NULL,NULL,NULL);
*/

CREATE TABLE IF NOT EXISTS `character_transfer`(
`GUID` INT(11) NOT NULL DEFAULT 0,
Expand Down
Binary file added Screenshots/import-step1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/login.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/userpanel-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions _transfer/b_approve.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<?php
/*
* Copyright (C) 2019+ MasterkinG32 <https://masterking32.com>
* Copyright (C) 2017+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/

ob_start();
session_start();
Expand All @@ -12,11 +18,13 @@
$ID = $_POST['Approve'];
$RealmID = $_POST['RealmlistList'];
$GUID = $_POST['GUID'];
if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(_CheckGMAccess($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
ApproveCharacterTransfer(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID);
UpdateDumpStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID, 1);
if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(_CheckGMAccess($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
ApproveCharacterTransfer(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID);
UpdateDumpStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID, 1);
ob_end_flush();
die("Done");
} else die("ACCESS DENIED:");
} else die("NOT \"IN PROGRESS\" STATUS");
} else die("LOG OFF WITH THIS CHARACTER! BEFORE MAKE ANY ACTIONS!");
Expand Down
16 changes: 11 additions & 5 deletions _transfer/b_cancel.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<?php
/*
* Copyright (C) 2019+ MasterkinG32 <https://masterking32.com>
* Copyright (C) 2017+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/

ob_start();
session_start();
Expand All @@ -12,11 +18,11 @@
$ID = $_POST['cancel'];
$RealmID = $_POST['RealmlistList'];
$GUID = $_POST['GUID'];
if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(!_CheckGMAccess($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
CancelORDenyCharacterTransfer(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID, $STORAGE);
UpdateDumpStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID, 3);
if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(!_CheckGMAccess($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
CancelORDenyCharacterTransfer(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID, $STORAGE);
UpdateDumpStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID, 3);
ob_end_flush();
die("Transfer with ID: ". $ID ." Canceled");
} else die("ACCESS DENIED");
Expand Down
32 changes: 20 additions & 12 deletions _transfer/b_deny.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<?php
/*
* Copyright (C) 2019+ MasterkinG32 <https://masterking32.com>
* Copyright (C) 2017+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/

ob_start();
session_start();

sleep(5);
include_once("t_dbfunctions.php");
include_once("t_functions.php");
include_once("t_config.php");
Expand All @@ -17,23 +23,25 @@
if(!isset($REASON) || empty($REASON))
$REASON = "Not meet requeriments.";

if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(_CheckGMAccess($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
AddComment($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID, $REASON);
CancelORDenyCharacterTransfer(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID, $STORAGE);
UpdateDumpStatus($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID, 2);
if(_CheckCharacterOnlineStatus(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID)) {
if(CheckTransferStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID) == 0) {
if(_CheckGMAccess($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ACCOUNT_ID, $GMLevel)) {
AddComment($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID, $REASON);
CancelORDenyCharacterTransfer(_HostDBSwitch($RealmID),$DB_PORT, $DBUser, $DBPassword, _CharacterDBSwitch($RealmID), $GUID, $STORAGE);
UpdateDumpStatus($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID, 2);
ob_end_flush();
die("Transfer with ID: ". $ID ." Canceled");
} else die("ACCESS DENIED");
} else die("NOT \"IN PROGRESS\" STATUS");
} else die("LOG OFF WITH THIS CHARACTER! BEFORE MAKE ANY ACTIONS!");
} else die("SHIT HAPPENS, ERROR 35");

ob_end_flush();

function AddComment($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $ID, $REASON){
$connection = mysql_connect($AccountDBHost, $DBUser, $DBPassword) or die(mysql_error());
_SelectDB($AccountDB, $connection);
$query = mysql_query("UPDATE `account_transfer` SET `Reason` = \"". _X($REASON) ."\" WHERE `id` = ". (int)$ID .";", $connection) or die(mysql_error());
mysql_close($connection);
function AddComment($AccountDBHost,$DB_PORT, $DBUser, $DBPassword, $AccountDB, $ID, $REASON){
$connection = mysqli_connect($AccountDBHost, $DBUser, $DBPassword,$AccountDB,$DB_PORT) or die(mysqli_error($connection));
_SelectDB($connection);
$query = mysqli_query($connection,"UPDATE `account_transfer` SET `Reason` = \"". _X($connection,$REASON) ."\" WHERE `id` = ". (int)$ID .";") or die(mysqli_error($connection));
mysqli_close($connection);
}
?>
Loading