mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Creatures
* flag creatures using creaturedisplayinfoextra.dbc as humanoid
This commit is contained in:
@@ -105,6 +105,7 @@ class NpcPage extends GenericPage
|
|||||||
$mapType = 1;
|
$mapType = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********/
|
/***********/
|
||||||
/* Infobox */
|
/* Infobox */
|
||||||
/***********/
|
/***********/
|
||||||
@@ -302,6 +303,7 @@ class NpcPage extends GenericPage
|
|||||||
if ($stats)
|
if ($stats)
|
||||||
$infobox[] = Lang::npc('stats').($modes ? ' ('.Lang::npc('modes', $mapType, 0).')' : null).Lang::main('colon').'[ul][li]'.implode('[/li][li]', $stats).'[/li][/ul]';
|
$infobox[] = Lang::npc('stats').($modes ? ' ('.Lang::npc('modes', $mapType, 0).')' : null).Lang::main('colon').'[ul][li]'.implode('[/li][li]', $stats).'[/li][/ul]';
|
||||||
|
|
||||||
|
|
||||||
/****************/
|
/****************/
|
||||||
/* Main Content */
|
/* Main Content */
|
||||||
/****************/
|
/****************/
|
||||||
@@ -329,6 +331,10 @@ class NpcPage extends GenericPage
|
|||||||
BUTTON_VIEW3D => ['type' => TYPE_NPC, 'typeId' => $this->typeId, 'displayId' => $this->subject->getRandomModelId()]
|
BUTTON_VIEW3D => ['type' => TYPE_NPC, 'typeId' => $this->typeId, 'displayId' => $this->subject->getRandomModelId()]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($this->subject->getField('humanoid'))
|
||||||
|
$this->redButtons[BUTTON_VIEW3D]['humanoid'] = 1;
|
||||||
|
|
||||||
|
|
||||||
/**************/
|
/**************/
|
||||||
/* Extra Tabs */
|
/* Extra Tabs */
|
||||||
/**************/
|
/**************/
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ CREATE TABLE `aowow_creature` (
|
|||||||
`displayId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`displayId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
`textureString` varchar(50) DEFAULT NULL,
|
`textureString` varchar(50) DEFAULT NULL,
|
||||||
`modelId` mediumint(8) NOT NULL,
|
`modelId` mediumint(8) NOT NULL,
|
||||||
|
`humanoid` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||||
`iconString` varchar(50) DEFAULT NULL COMMENT 'first texture of first model for search (up to 11 other skins omitted..)',
|
`iconString` varchar(50) DEFAULT NULL COMMENT 'first texture of first model for search (up to 11 other skins omitted..)',
|
||||||
`name_loc0` varchar(100) NOT NULL DEFAULT '0',
|
`name_loc0` varchar(100) NOT NULL DEFAULT '0',
|
||||||
`name_loc2` varchar(100) DEFAULT NULL,
|
`name_loc2` varchar(100) DEFAULT NULL,
|
||||||
@@ -2679,7 +2680,7 @@ UNLOCK TABLES;
|
|||||||
|
|
||||||
LOCK TABLES `aowow_dbversion` WRITE;
|
LOCK TABLES `aowow_dbversion` WRITE;
|
||||||
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
|
||||||
INSERT INTO `aowow_dbversion` VALUES (1490912250,0,NULL,NULL);
|
INSERT INTO `aowow_dbversion` VALUES (1491915060,0,NULL,NULL);
|
||||||
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ function creature(array $ids = [])
|
|||||||
modelid1, modelid2, modelid3, modelid4,
|
modelid1, modelid2, modelid3, modelid4,
|
||||||
"" AS textureString, -- textureString
|
"" AS textureString, -- textureString
|
||||||
0 AS modelId, -- modelId
|
0 AS modelId, -- modelId
|
||||||
|
0 AS humanoid, -- uses creaturedisplayinfoextra
|
||||||
"" AS iconString, -- iconString
|
"" AS iconString, -- iconString
|
||||||
ct.name, IFNULL(ctl2.`Name`, "") AS n2, IFNULL(ctl3.`Name`, "") AS n3, IFNULL(ctl6.`Name`, "") AS n6, IFNULL(ctl8.`Name`, "") AS n8,
|
ct.name, IFNULL(ctl2.`Name`, "") AS n2, IFNULL(ctl3.`Name`, "") AS n3, IFNULL(ctl6.`Name`, "") AS n6, IFNULL(ctl8.`Name`, "") AS n8,
|
||||||
subname, IFNULL(ctl2.`Title`, "") AS t2, IFNULL(ctl3.`Title`, "") AS t3, IFNULL(ctl6.`Title`, "") AS t6, IFNULL(ctl8.`Title`, "") AS t8,
|
subname, IFNULL(ctl2.`Title`, "") AS t2, IFNULL(ctl3.`Title`, "") AS t3, IFNULL(ctl6.`Title`, "") AS t6, IFNULL(ctl8.`Title`, "") AS t8,
|
||||||
@@ -125,7 +126,8 @@ function creature(array $ids = [])
|
|||||||
SET
|
SET
|
||||||
c.textureString = IFNULL(cdie.textureString, cdi.skin1),
|
c.textureString = IFNULL(cdie.textureString, cdi.skin1),
|
||||||
c.modelId = cdi.modelId,
|
c.modelId = cdi.modelId,
|
||||||
c.iconString = cdi.iconString';
|
c.iconString = cdi.iconString,
|
||||||
|
c.humanoid = IF(cdie.id IS NULL, 0, 1)';
|
||||||
|
|
||||||
$lastMax = 0;
|
$lastMax = 0;
|
||||||
while ($npcs = DB::World()->select($baseQuery, NPC_CU_INSTANCE_BOSS, $lastMax, $ids ?: DBSIMPLE_SKIP, SqlGen::$stepSize))
|
while ($npcs = DB::World()->select($baseQuery, NPC_CU_INSTANCE_BOSS, $lastMax, $ids ?: DBSIMPLE_SKIP, SqlGen::$stepSize))
|
||||||
|
|||||||
4
setup/updates/1491915058_01.sql
Normal file
4
setup/updates/1491915058_01.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE `aowow_creature`
|
||||||
|
ADD COLUMN `humanoid` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `modelId`;
|
||||||
|
|
||||||
|
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' creature');
|
||||||
Reference in New Issue
Block a user