mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* hide creatures for internal use from listviews * correct Nightelf Player faction * trying to enforce strict line endings
39 lines
1019 B
PHP
39 lines
1019 B
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
if (!CLI)
|
|
die('not in cli mode');
|
|
|
|
|
|
$customData = array(
|
|
);
|
|
$reqDBC = ['factiontemplate'];
|
|
|
|
function factiontemplate()
|
|
{
|
|
$query = '
|
|
REPLACE INTO
|
|
?_factiontemplate
|
|
SELECT
|
|
id,
|
|
factionId,
|
|
IF(friendFactionId1 = 1 OR friendFactionId2 = 1 OR friendFactionId3 = 1 OR friendFactionId4 = 1 OR friendlyMask & 0x3,
|
|
1,
|
|
IF(enemyFactionId1 = 1 OR enemyFactionId2 = 1 OR enemyFactionId3 = 1 OR enemyFactionId4 = 1 OR hostileMask & 0x3, -1, 0)
|
|
),
|
|
IF(friendFactionId1 = 2 OR friendFactionId2 = 2 OR friendFactionId3 = 2 OR friendFactionId4 = 2 OR friendlyMask & 0x5,
|
|
1,
|
|
IF(enemyFactionId1 = 2 OR enemyFactionId2 = 2 OR enemyFactionId3 = 2 OR enemyFactionId4 = 2 OR hostileMask & 0x5, -1, 0)
|
|
)
|
|
FROM
|
|
dbc_factiontemplate';
|
|
|
|
DB::Aowow()->query($query);
|
|
|
|
return true;
|
|
}
|
|
|
|
?>
|