1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 03:37:48 +00:00

DOH/DOL graphic support.

Adding the rest of the missing item graphics for DOH/DOL weapons. Modified the equip script to also set the correct "special" graphics for the workbenches and such.
This commit is contained in:
Filip Maj 2020-03-29 13:33:27 -04:00
parent 41b891feaf
commit 20b1ec18a9
3 changed files with 267 additions and 53 deletions

View file

@ -153,6 +153,7 @@ function equipItem(player, equipSlot, item)
player:GetEquipment():Set(equipSlot, item); player:GetEquipment():Set(equipSlot, item);
--EquipSlot -> GraphicSlot
if (equipSlot == EQUIPSLOT_MAINHAND and gItem:IsNailWeapon() == false) then graphicSlot = GRAPHICSLOT_MAINHAND; if (equipSlot == EQUIPSLOT_MAINHAND and gItem:IsNailWeapon() == false) then graphicSlot = GRAPHICSLOT_MAINHAND;
elseif (equipSlot == EQUIPSLOT_OFFHAND) then graphicSlot = GRAPHICSLOT_OFFHAND; elseif (equipSlot == EQUIPSLOT_OFFHAND) then graphicSlot = GRAPHICSLOT_OFFHAND;
elseif (equipSlot == EQUIPSLOT_THROWINGWEAPON) then graphicSlot = GRAPHICSLOT_THROWING; elseif (equipSlot == EQUIPSLOT_THROWINGWEAPON) then graphicSlot = GRAPHICSLOT_THROWING;
@ -168,12 +169,17 @@ function equipItem(player, equipSlot, item)
elseif (equipSlot == EQUIPSLOT_LFINGER) then graphicSlot = GRAPHICSLOT_L_RINGFINGER; elseif (equipSlot == EQUIPSLOT_LFINGER) then graphicSlot = GRAPHICSLOT_L_RINGFINGER;
end end
--Special cases for WVR and GSM. Offhand goes to the special offhand slot.
if (equipSlot == EQUIPSLOT_OFFHAND) then
if (gItem:IsWeaverWeapon() == true) then graphicSlot = GRAPHICSLOT_SPOFFHAND; end
if (gItem:IsGoldSmithWeapon() == true) then graphicSlot = GRAPHICSLOT_SPOFFHAND; end
end
--Graphic Slot was set, otherwise it's a special case --Graphic Slot was set, otherwise it's a special case
if (graphicSlot ~= nil) then if (graphicSlot ~= nil) then
player:GraphicChange(graphicSlot, item); player:GraphicChange(graphicSlot, item);
elseif (gItem:IsNailWeapon()) then elseif (gItem:IsNailWeapon()) then
player:GraphicChange(GRAPHICSLOT_MAINHAND, item); player:GraphicChange(GRAPHICSLOT_MAINHAND, item);
player:GraphicChange(GRAPHICSLOT_OFFHAND, item);
elseif (equipSlot == EQUIPSLOT_EARS) then elseif (equipSlot == EQUIPSLOT_EARS) then
player:GraphicChange(GRAPHICSLOT_R_EAR, item); player:GraphicChange(GRAPHICSLOT_R_EAR, item);
player:GraphicChange(GRAPHICSLOT_L_EAR, item); player:GraphicChange(GRAPHICSLOT_L_EAR, item);
@ -181,6 +187,33 @@ function equipItem(player, equipSlot, item)
player:GraphicChange(GRAPHICSLOT_R_WRIST, item); player:GraphicChange(GRAPHICSLOT_R_WRIST, item);
player:GraphicChange(GRAPHICSLOT_L_WRIST, item); player:GraphicChange(GRAPHICSLOT_L_WRIST, item);
end end
--Special graphics for crafting classes
if (classId ~= nil) then
if (gItem:IsCarpenterWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 898,4,0,0);
player:GraphicChange(GRAPHICSLOT_SPOFFHAND, 898,4,0,0);
elseif (gItem:IsBlackSmithWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 899,1,0,0);
player:GraphicChange(GRAPHICSLOT_SPOFFHAND, 899,1,0,0);
elseif (gItem:IsArmorerWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 899,2,0,0);
player:GraphicChange(GRAPHICSLOT_SPOFFHAND, 899,2,0,0);
elseif (gItem:IsGoldSmithWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 898,1,0,0);
elseif (gItem:IsTannerWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 898,3,0,0);
player:GraphicChange(GRAPHICSLOT_SPOFFHAND, 898,3,0,0);
elseif (gItem:IsWeaverWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 000,0,0,0);
elseif (gItem:IsAlchemistWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 900,1,0,0);
elseif (gItem:IsCulinarianWeapon()) then
player:GraphicChange(GRAPHICSLOT_SPMAINHAND, 900,2,0,0);
player:GraphicChange(GRAPHICSLOT_SPOFFHAND, 898,2,0,0);
end
end
end end
end end

View file

@ -11,7 +11,13 @@
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for ffxiv_server
CREATE DATABASE IF NOT EXISTS `ffxiv_server` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `ffxiv_server`;
-- Dumping structure for table ffxiv_server.gamedata_items_graphics -- Dumping structure for table ffxiv_server.gamedata_items_graphics
DROP TABLE IF EXISTS `gamedata_items_graphics`;
CREATE TABLE IF NOT EXISTS `gamedata_items_graphics` ( CREATE TABLE IF NOT EXISTS `gamedata_items_graphics` (
`catalogID` int(10) unsigned NOT NULL, `catalogID` int(10) unsigned NOT NULL,
`weaponId` int(10) unsigned NOT NULL, `weaponId` int(10) unsigned NOT NULL,
@ -21,9 +27,9 @@ CREATE TABLE IF NOT EXISTS `gamedata_items_graphics` (
PRIMARY KEY (`catalogID`) PRIMARY KEY (`catalogID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table ffxiv_server.gamedata_items_graphics: ~3,938 rows (approximately) -- Dumping data for table ffxiv_server.gamedata_items_graphics: ~4,098 rows (approximately)
/*!40000 ALTER TABLE `gamedata_items_graphics` DISABLE KEYS */; /*!40000 ALTER TABLE `gamedata_items_graphics` DISABLE KEYS */;
REPLACE INTO `gamedata_items_graphics` (`catalogID`, `weaponId`, `equipmentId`, `variantId`, `colorId`) VALUES INSERT INTO `gamedata_items_graphics` (`catalogID`, `weaponId`, `equipmentId`, `variantId`, `colorId`) VALUES
(3910001, 396, 1, 20, 0), (3910001, 396, 1, 20, 0),
(3910005, 396, 1, 10, 0), (3910005, 396, 1, 10, 0),
(3910006, 396, 2, 30, 0), (3910006, 396, 2, 30, 0),
@ -634,7 +640,7 @@ REPLACE INTO `gamedata_items_graphics` (`catalogID`, `weaponId`, `equipmentId`,
(6020007, 688, 1, 11, 0), (6020007, 688, 1, 11, 0),
(6020008, 688, 1, 1, 0), (6020008, 688, 1, 1, 0),
(6020009, 688, 1, 11, 0), (6020009, 688, 1, 11, 0),
(6020010, 688, 1, 20, 0), (6020010, 688, 1, 30, 0),
(6020011, 688, 1, 21, 0), (6020011, 688, 1, 21, 0),
(6020012, 688, 1, 2, 0), (6020012, 688, 1, 2, 0),
(6020014, 688, 1, 30, 0), (6020014, 688, 1, 30, 0),
@ -690,12 +696,113 @@ REPLACE INTO `gamedata_items_graphics` (`catalogID`, `weaponId`, `equipmentId`,
(6040015, 718, 2, 10, 0), (6040015, 718, 2, 10, 0),
(6040016, 720, 2, 0, 0), (6040016, 720, 2, 0, 0),
(6041001, 728, 1, 0, 0), (6041001, 728, 1, 0, 0),
(6041002, 728, 1, 0, 0), (6041002, 728, 1, 10, 0),
(6041003, 728, 1, 0, 0), (6041003, 728, 1, 20, 0),
(7010001, 823, 1, 20, 0), (6041004, 728, 1, 10, 0),
(6041005, 728, 1, 0, 0),
(6041006, 728, 1, 20, 0),
(6041007, 728, 1, 30, 0),
(6041008, 728, 1, 40, 0),
(6050001, 733, 1, 0, 0),
(6050002, 733, 1, 10, 0),
(6050003, 733, 1, 20, 0),
(6050004, 733, 3, 0, 0),
(6050005, 733, 2, 0, 0),
(6050006, 733, 1, 11, 0),
(6050007, 733, 1, 10, 0),
(6050008, 733, 2, 1, 0),
(6050009, 733, 1, 0, 0),
(6050010, 733, 1, 10, 0),
(6050011, 733, 2, 0, 0),
(6050012, 733, 3, 0, 0),
(6050013, 733, 2, 1, 0),
(6050014, 733, 3, 10, 0),
(6050015, 733, 1, 12, 0),
(6050016, 734, 2, 0, 0),
(6051001, 744, 1, 0, 0),
(6051002, 744, 1, 1, 0),
(6051003, 744, 1, 2, 0),
(6051004, 744, 1, 0, 0),
(6051005, 744, 1, 1, 0),
(6051006, 744, 1, 2, 0),
(6051007, 744, 1, 10, 0),
(6051008, 744, 1, 3, 0),
(6060001, 748, 1, 1, 0),
(6060002, 748, 1, 30, 0),
(6060003, 748, 1, 0, 0),
(6060004, 748, 1, 11, 0),
(6060005, 748, 1, 10, 0),
(6060006, 748, 1, 50, 0),
(6060007, 748, 1, 12, 0),
(6060008, 748, 1, 0, 0),
(6060009, 748, 1, 1, 0),
(6060010, 748, 1, 10, 0),
(6060011, 748, 1, 11, 0),
(6060012, 748, 1, 12, 0),
(6060013, 748, 1, 30, 0),
(6060014, 748, 1, 12, 0),
(6060015, 750, 1, 0, 0),
(6061001, 758, 1, 0, 0),
(6061002, 758, 1, 1, 0),
(6061003, 758, 1, 2, 0),
(6061004, 758, 1, 4, 0),
(6061005, 758, 1, 0, 0),
(6061006, 758, 1, 2, 0),
(6061007, 758, 1, 1, 0),
(6061008, 758, 1, 3, 0),
(6061009, 758, 1, 5, 0),
(6070001, 763, 1, 10, 0),
(6070002, 763, 1, 0, 0),
(6070003, 763, 1, 1, 0),
(6070004, 763, 1, 2, 0),
(6070005, 763, 2, 0, 0),
(6070006, 763, 4, 0, 0),
(6070007, 763, 1, 0, 0),
(6070008, 763, 3, 0, 0),
(6070009, 763, 1, 0, 0),
(6070010, 763, 1, 1, 0),
(6070011, 763, 1, 2, 0),
(6070012, 763, 2, 0, 0),
(6070013, 763, 4, 0, 0),
(6070014, 763, 5, 0, 0),
(6070015, 763, 3, 0, 0),
(6070016, 764, 5, 0, 0),
(6071001, 773, 1, 0, 0),
(6071002, 773, 1, 1, 0),
(6071003, 773, 1, 2, 0),
(6071004, 773, 1, 0, 0),
(6071005, 773, 1, 1, 0),
(6071006, 773, 1, 2, 0),
(6071007, 773, 1, 20, 0),
(6071008, 773, 1, 3, 0),
(6080001, 778, 1, 40, 0),
(6080002, 778, 1, 0, 0),
(6080003, 778, 1, 10, 0),
(6080004, 778, 1, 13, 0),
(6080005, 778, 2, 0, 0),
(6080006, 778, 3, 0, 0),
(6080007, 778, 1, 20, 0),
(6080008, 778, 1, 11, 0),
(6080009, 778, 1, 0, 0),
(6080010, 778, 1, 10, 0),
(6080011, 778, 2, 0, 0),
(6080012, 778, 3, 0, 0),
(6080013, 778, 1, 20, 0),
(6080014, 778, 2, 1, 0),
(6080015, 778, 1, 14, 0),
(6080016, 779, 2, 0, 0),
(6081001, 788, 1, 0, 0),
(6081002, 788, 1, 1, 0),
(6081003, 788, 1, 10, 0),
(6081004, 788, 1, 0, 0),
(6081005, 788, 1, 1, 0),
(6081006, 788, 1, 2, 0),
(6081007, 788, 1, 10, 0),
(6081008, 788, 1, 3, 0),
(7010001, 823, 1, 0, 0),
(7010002, 823, 1, 1, 0), (7010002, 823, 1, 1, 0),
(7010003, 823, 1, 2, 0), (7010003, 823, 1, 2, 0),
(7010004, 823, 1, 20, 0), (7010004, 823, 1, 0, 0),
(7010005, 823, 1, 20, 0), (7010005, 823, 1, 20, 0),
(7010006, 823, 2, 0, 0), (7010006, 823, 2, 0, 0),
(7010007, 823, 2, 0, 0), (7010007, 823, 2, 0, 0),
@ -708,6 +815,65 @@ REPLACE INTO `gamedata_items_graphics` (`catalogID`, `weaponId`, `equipmentId`,
(7010015, 823, 2, 0, 0), (7010015, 823, 2, 0, 0),
(7010016, 823, 2, 1, 0), (7010016, 823, 2, 1, 0),
(7010017, 823, 3, 10, 0), (7010017, 823, 3, 10, 0),
(7010101, 833, 1, 0, 0),
(7010102, 833, 1, 1, 0),
(7010103, 833, 1, 0, 0),
(7010104, 833, 1, 1, 0),
(7010105, 833, 1, 2, 0),
(7010106, 833, 1, 10, 0),
(7010107, 833, 1, 10, 0),
(7010108, 833, 1, 0, 0),
(7010109, 833, 1, 3, 0),
(7020001, 838, 1, 0, 0),
(7020002, 838, 1, 20, 0),
(7020003, 838, 2, 0, 0),
(7020004, 838, 1, 10, 0),
(7020005, 838, 3, 0, 0),
(7020006, 838, 3, 10, 0),
(7020007, 838, 3, 0, 0),
(7020008, 838, 1, 11, 0),
(7020009, 838, 1, 0, 0),
(7020010, 838, 1, 10, 0),
(7020011, 838, 2, 0, 0),
(7020012, 838, 3, 10, 0),
(7020013, 838, 1, 11, 0),
(7020014, 838, 2, 1, 0),
(7020015, 838, 4, 0, 0),
(7020016, 838, 3, 30, 0),
(7020101, 848, 1, 0, 0),
(7020102, 848, 1, 1, 0),
(7020103, 848, 1, 2, 0),
(7020104, 848, 1, 0, 0),
(7020105, 848, 1, 1, 0),
(7020106, 848, 1, 2, 0),
(7020107, 848, 1, 10, 0),
(7020108, 848, 1, 0, 0),
(7020109, 848, 1, 3, 0),
(7030001, 853, 1, 10, 0),
(7030002, 853, 1, 20, 0),
(7030003, 853, 2, 1, 0),
(7030004, 853, 1, 0, 0),
(7030005, 853, 1, 11, 0),
(7030006, 853, 2, 0, 0),
(7030007, 853, 2, 1, 0),
(7030008, 853, 3, 0, 0),
(7030009, 853, 1, 10, 0),
(7030010, 853, 1, 0, 0),
(7030011, 853, 2, 0, 0),
(7030012, 853, 1, 10, 0),
(7030013, 853, 3, 0, 0),
(7030014, 853, 2, 10, 0),
(7030015, 853, 2, 30, 0),
(7030016, 853, 2, 50, 0),
(7030101, 863, 1, 0, 0),
(7030102, 863, 1, 1, 0),
(7030103, 863, 1, 2, 0),
(7030104, 863, 1, 0, 0),
(7030105, 863, 1, 1, 0),
(7030106, 863, 1, 2, 0),
(7030107, 863, 1, 10, 0),
(7030108, 863, 1, 0, 0),
(7030109, 863, 1, 3, 0),
(8010001, 0, 3, 0, 0), (8010001, 0, 3, 0, 0),
(8010002, 0, 3, 1, 0), (8010002, 0, 3, 1, 0),
(8010003, 0, 3, 4, 0), (8010003, 0, 3, 4, 0),

View file

@ -983,6 +983,66 @@ namespace Meteor.Map.Actors
} }
public void GraphicChange(int slot, InventoryItem invItem)
{
if (invItem == null)
appearanceIds[slot] = 0;
else
{
ItemData item = Server.GetItemGamedata(invItem.itemId);
if (item is EquipmentItem)
{
EquipmentItem eqItem = (EquipmentItem)item;
uint mixedVariantId;
if (eqItem.graphicsWeaponId == 0)
mixedVariantId = ((eqItem.graphicsVariantId & 0x1F) << 5) | eqItem.graphicsColorId;
else
mixedVariantId = eqItem.graphicsVariantId;
uint graphicId =
(eqItem.graphicsWeaponId & 0x3FF) << 20 |
(eqItem.graphicsEquipmentId & 0x3FF) << 10 |
(mixedVariantId & 0x3FF);
appearanceIds[slot] = graphicId;
}
//Handle offhand
if (slot == MAINHAND && item is WeaponItem)
{
WeaponItem wpItem = (WeaponItem)item;
uint graphicId =
(wpItem.graphicsOffhandWeaponId & 0x3FF) << 20 |
(wpItem.graphicsOffhandEquipmentId & 0x3FF) << 10 |
(wpItem.graphicsOffhandVariantId & 0x3FF);
if (graphicId != 0)
appearanceIds[SetActorAppearancePacket.OFFHAND] = graphicId;
}
//Handle ALC offhand special case
if (slot == OFFHAND && item is WeaponItem && item.IsAlchemistWeapon())
{
WeaponItem wpItem = (WeaponItem)item;
uint graphicId =
((wpItem.graphicsWeaponId + 1) & 0x3FF) << 20 |
(wpItem.graphicsEquipmentId & 0x3FF) << 10 |
(wpItem.graphicsVariantId & 0x3FF);
if (graphicId != 0)
appearanceIds[SetActorAppearancePacket.SPOFFHAND] = graphicId;
}
}
Database.SavePlayerAppearance(this);
BroadcastPacket(CreateAppearancePacket(), true);
}
public void SendAppearance() public void SendAppearance()
{ {
BroadcastPacket(CreateAppearancePacket(), true); BroadcastPacket(CreateAppearancePacket(), true);
@ -1166,51 +1226,6 @@ namespace Meteor.Map.Actors
QueuePackets(packets); QueuePackets(packets);
} }
public void GraphicChange(int slot, InventoryItem invItem)
{
if (invItem == null)
appearanceIds[slot] = 0;
else
{
ItemData item = Server.GetItemGamedata(invItem.itemId);
if (item is EquipmentItem)
{
EquipmentItem eqItem = (EquipmentItem)item;
uint mixedVariantId;
if (eqItem.graphicsWeaponId == 0)
mixedVariantId = ((eqItem.graphicsVariantId & 0x1F) << 5) | eqItem.graphicsColorId;
else
mixedVariantId = eqItem.graphicsVariantId;
uint graphicId =
(eqItem.graphicsWeaponId & 0x3FF) << 20 |
(eqItem.graphicsEquipmentId & 0x3FF) << 10 |
(mixedVariantId & 0x3FF);
appearanceIds[slot] = graphicId;
}
//Handle offhand
if (slot == MAINHAND && item is WeaponItem)
{
WeaponItem wpItem = (WeaponItem)item;
uint graphicId =
(wpItem.graphicsOffhandWeaponId & 0x3FF) << 20 |
(wpItem.graphicsOffhandEquipmentId & 0x3FF) << 10 |
(wpItem.graphicsOffhandVariantId & 0x3FF);
appearanceIds[SetActorAppearancePacket.OFFHAND] = graphicId;
}
}
Database.SavePlayerAppearance(this);
BroadcastPacket(CreateAppearancePacket(), true);
}
public void SetRepairRequest(byte type) public void SetRepairRequest(byte type)
{ {
charaWork.eventSave.repairType = type; charaWork.eventSave.repairType = type;