Creatures

* flag creatures using creaturedisplayinfoextra.dbc as humanoid
This commit is contained in:
Sarjuuk
2017-04-11 15:11:18 +02:00
parent dde09a8a02
commit 6df3a27279
4 changed files with 15 additions and 2 deletions

View File

@@ -105,6 +105,7 @@ class NpcPage extends GenericPage
$mapType = 1;
}
/***********/
/* Infobox */
/***********/
@@ -302,6 +303,7 @@ class NpcPage extends GenericPage
if ($stats)
$infobox[] = Lang::npc('stats').($modes ? ' ('.Lang::npc('modes', $mapType, 0).')' : null).Lang::main('colon').'[ul][li]'.implode('[/li][li]', $stats).'[/li][/ul]';
/****************/
/* Main Content */
/****************/
@@ -329,6 +331,10 @@ class NpcPage extends GenericPage
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 */
/**************/

View File

@@ -438,6 +438,7 @@ CREATE TABLE `aowow_creature` (
`displayId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`textureString` varchar(50) DEFAULT 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..)',
`name_loc0` varchar(100) NOT NULL DEFAULT '0',
`name_loc2` varchar(100) DEFAULT NULL,
@@ -2679,7 +2680,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!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 */;
UNLOCK TABLES;

View File

@@ -30,6 +30,7 @@ function creature(array $ids = [])
modelid1, modelid2, modelid3, modelid4,
"" AS textureString, -- textureString
0 AS modelId, -- modelId
0 AS humanoid, -- uses creaturedisplayinfoextra
"" 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,
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
c.textureString = IFNULL(cdie.textureString, cdi.skin1),
c.modelId = cdi.modelId,
c.iconString = cdi.iconString';
c.iconString = cdi.iconString,
c.humanoid = IF(cdie.id IS NULL, 0, 1)';
$lastMax = 0;
while ($npcs = DB::World()->select($baseQuery, NPC_CU_INSTANCE_BOSS, $lastMax, $ids ?: DBSIMPLE_SKIP, SqlGen::$stepSize))

View 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');