Skip to content

Instantly share code, notes, and snippets.

View Goatform's full-sized avatar

Goatform

View GitHub Profile
@Goatform
Goatform / README.md
Created September 3, 2024 07:23 — forked from zhiguangwang/README.md
Building Unreal Engine Game Client and Dedicated Server on Linux.

Building Unreal Engine Game Client and Dedicated Server on Linux

Because the build tools of UE4 works across platforms (Windows, Mac OS, Linux), steps in this article can be applied to Mac OS and Windows as well.

On Windows, You need to replace RunUAT.sh with RunUAT.bat though.

Prerequisites

First, get Unreal Engine 4 sourcecode and export the following environment variables:

@Goatform
Goatform / squash-commits.sh
Created January 3, 2016 16:08 — forked from jbub/squash-commits.sh
git squash last two commits into one
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
@Goatform
Goatform / gist:fcd70f1a23268ae3a208
Last active August 29, 2015 14:27
Missing spells in sSpellsByCategoryStore
Item(Entry: 835) spellid_1 (8312) category 24 added to sSpellsByCategoryStore
Item(Entry: 1127) spellid_1 (2120) category 24 added to sSpellsByCategoryStore
Item(Entry: 1191) spellid_1 (5917) category 24 added to sSpellsByCategoryStore
Item(Entry: 1251) spellid_1 (746) category 150 added to sSpellsByCategoryStore
Item(Entry: 1262) spellid_1 (5257) category 59 added to sSpellsByCategoryStore
Item(Entry: 1322) spellid_1 (7396) category 1153 added to sSpellsByCategoryStore
Item(Entry: 1399) spellid_1 (49512) category 24 added to sSpellsByCategoryStore
Item(Entry: 1401) spellid_1 (833) category 11 added to sSpellsByCategoryStore
Item(Entry: 1434) spellid_1 (13424) category 24 added to sSpellsByCategoryStore
Item(Entry: 1703) spellid_1 (1138) category 1153 added to sSpellsByCategoryStore
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType*/, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
{
CalcDamageInfo dmgInfo;
dmgInfo.HitInfo = HitInfo;
dmgInfo.attacker = this;
dmgInfo.target = target;
dmgInfo.damage = Damage - AbsorbDamage - Resist - BlockedAmount;
dmgInfo.damageSchoolMask = damageSchoolMask;
dmgInfo.absorb = AbsorbDamage;
dmgInfo.resist = Resist;
ALTER TABLE `corpse` DROP `phaseMask`;
DROP TABLE IF EXISTS `corpse_phases`;
CREATE TABLE `corpse_phases` (
`Guid` int(10) unsigned NOT NULL,
`PhaseId` int(10) unsigned NOT NULL,
`OwnerGuid` int(10) unsigned NOT NULL,
`Time` int(10) unsigned NOT NULL DEFAULT '0',
`CorpseType` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`Guid`,`PhaseId`)
DELETE FROM `rbac_permissions` WHERE `id`=776;
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (776, 'Command: debug phase');
DELETE FROM `rbac_linked_permissions` WHERE `id`=192 AND linkedId=776;
INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES (192, 776);
DROP TABLE IF EXISTS `terrain_phase_info`;
DROP TABLE IF EXISTS `terrain_map_info`;
DROP TABLE IF EXISTS `terrain_swap_defaults`;
DROP TABLE IF EXISTS `terrain_worldmap`;
CREATE TABLE `terrain_phase_info`(
`Id` INT(10) unsigned NOT NULL,
`TerrainSwapMap` INT(10) unsigned NOT NULL,
`Comment` VARCHAR(255),
PRIMARY KEY (`Id`, `TerrainSwapMap`)
ALTER TABLE `creature`
ADD `PhaseId` INT(10) DEFAULT '0' AFTER `phaseMask`,
ADD `PhaseGroup` INT(10) DEFAULT '0' AFTER `PhaseId`;
ALTER TABLE `gameobject`
ADD `PhaseId` INT(10) DEFAULT '0' AFTER `phaseMask`,
ADD `PhaseGroup` INT(10) DEFAULT '0' AFTER `PhaseId`;
DROP TABLE IF EXISTS `spell_phase`;
/*Table structure for table `phase_definitions` */
@Goatform
Goatform / morph-fix
Created December 23, 2014 21:17
Morph Fix
---
src/server/game/Entities/Unit/Unit.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index dba6abb..db931b0 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -13111,6 +13111,11 @@ bool Unit::IsInFeralForm() const