This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL] for creating a new class  (Read 12871 times)

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
[TUTORIAL] for creating a new class
« on: January 21, 2013, 07:58:32 pm »
I will not be wordy, all will be shown in the form of code or screenshots  :D


First we need to make some changes to the core.

Code: [Select]
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 93d4796..6a62fc2 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -881,6 +881,7 @@ bool Creature::isCanTrainingOf(Player* player, bool msg) const
                     switch (GetCreatureTemplate()->trainer_class)
                     {
                         case CLASS_DRUID:  player->PlayerTalkClass->SendGossipMenu(4913, GetGUID()); break;
+ case CLASS_TEST:   player->PlayerTalkClass->SendGossipMenu(324913, GetGUID()); break; // CLASS TRAINER
                         case CLASS_HUNTER: player->PlayerTalkClass->SendGossipMenu(10090, GetGUID()); break;
                         case CLASS_MAGE:   player->PlayerTalkClass->SendGossipMenu(328, GetGUID()); break;
                         case CLASS_PALADIN:player->PlayerTalkClass->SendGossipMenu(1635, GetGUID()); break;

warning: LF will be replaced by CRLF in src/server/game/Entities/Creature/Creature.cpp.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h
index f689237..55a02a0 100644
--- a/src/server/game/Entities/Item/ItemPrototype.h
+++ b/src/server/game/Entities/Item/ItemPrototype.h
@@ -506,6 +506,7 @@ enum ItemSubclassGlyph
     ITEM_SUBCLASS_GLYPH_SHAMAN                  = 7,
     ITEM_SUBCLASS_GLYPH_MAGE                    = 8,
     ITEM_SUBCLASS_GLYPH_WARLOCK                 = 9,
+ ITEM_SUBCLASS_GLYPH_TEST                    = 10,
     ITEM_SUBCLASS_GLYPH_DRUID                   = 11
 };
 

warning: LF will be replaced by CRLF in src/server/game/Entities/Item/ItemPrototype.h.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 073fadd..438d2a7 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -5761,7 +5761,7 @@ void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing)
          0.021080f, // Shaman
          0.036587f, // Mage
          0.024211f, // Warlock
-         0.0f,      // ??
+         0.05f,     // TEST
          0.056097f  // Druid
     };
     // Crit/agility to dodge/agility coefficient multipliers; 3.2.0 increased required agility by 15%
@@ -5776,7 +5776,7 @@ void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing)
          1.60f/1.15f,    // Shaman
          1.00f/1.15f,    // Mage
          0.97f/1.15f,    // Warlock (?)
-         0.0f,           // ??
+         2.00f/1.15f,    // TEST
          2.00f/1.15f     // Druid
     };
 
@@ -11957,7 +11957,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
                 return EQUIP_ERR_CANT_DO_RIGHT_NOW;
         }
 
-        if (_class == CLASS_ROGUE || _class == CLASS_DRUID)
+        if (_class == CLASS_ROGUE || _class == CLASS_DRUID || _class == CLASS_TEST)
             if (proto->SubClass != ITEM_SUBCLASS_ARMOR_LEATHER)
                 return EQUIP_ERR_CANT_DO_RIGHT_NOW;
 

warning: LF will be replaced by CRLF in src/server/game/Entities/Player/Player.cpp.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 5cf0550..4777abd 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -306,6 +306,9 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
             case CLASS_WARRIOR:
                 val2 = level + GetStat(STAT_AGILITY) - 10.0f;
                 break;
+ case CLASS_TEST:
+                val2 = level * 1.5f + GetStat(STAT_AGILITY) - 10.0f;
+                break;
             case CLASS_DRUID:
                 switch (GetShapeshiftForm())
                 {
@@ -339,6 +342,9 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
             case CLASS_HUNTER:
                 val2 = level * 2.0f + GetStat(STAT_STRENGTH) + GetStat(STAT_AGILITY) - 20.0f;
                 break;
+ case CLASS_TEST:
+                val2 = level * 1.5f + GetStat(STAT_STRENGTH) + GetStat(STAT_AGILITY) - 20.0f;
+                break;
             case CLASS_SHAMAN:
                 val2 = level * 2.0f + GetStat(STAT_STRENGTH) + GetStat(STAT_AGILITY) - 20.0f;
                 break;
@@ -634,7 +640,7 @@ const float m_diminishing_k[MAX_CLASSES] =
     0.9880f,  // Shaman
     0.9830f,  // Mage
     0.9830f,  // Warlock
-    0.0f,     // ??
+    0.9730f,  // TEST
     0.9720f   // Druid
 };
 
@@ -651,7 +657,7 @@ float Player::GetMissPercentageFromDefence() const
         16.00f,     // Shaman  //?
         16.00f,     // Mage    //?
         16.00f,     // Warlock //?
-        0.0f,       // ??
+        16.00f,     // TEST
         16.00f      // Druid   //?
     };
 
@@ -678,7 +684,7 @@ void Player::UpdateParryPercentage()
         145.560408f,    // Shaman
         0.0f,           // Mage
         0.0f,           // Warlock
-        0.0f,           // ??
+        0.0f,           // test
         0.0f            // Druid
     };
 
@@ -715,7 +721,7 @@ void Player::UpdateDodgePercentage()
         145.560408f,    // Shaman
         150.375940f,    // Mage
         150.375940f,    // Warlock
-        0.0f,           // ??
+        150.0f,         // test
         116.890707f     // Druid
     };
 

warning: LF will be replaced by CRLF in src/server/game/Entities/Unit/StatSystem.cpp.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 3025779..ff5dff3 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -3588,6 +3588,13 @@ void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, Play
                 info->stats[STAT_INTELLECT] += (lvl > 33 ? 2: (lvl > 2 ? 1: 0));
                 info->stats[STAT_SPIRIT]    += (lvl > 38 ? 2: (lvl > 3 ? 1: 0));
                 break;
+ case CLASS_TEST:
+                info->stats[STAT_STRENGTH]  += (lvl > 34 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));
+                info->stats[STAT_STAMINA]   += (lvl > 4 ? 1: 0);
+                info->stats[STAT_AGILITY]   += (lvl > 7 && !(lvl%2) ? 1: 0);
+                info->stats[STAT_INTELLECT] += (lvl > 5 ? 1: 0);
+                info->stats[STAT_SPIRIT]    += (lvl > 4 ? 1: 0);
+                break;
             case CLASS_DRUID:
                 info->stats[STAT_STRENGTH]  += (lvl > 38 ? 2: (lvl > 6 && (lvl%2) ? 1: 0));
                 info->stats[STAT_STAMINA]   += (lvl > 32 ? 2: (lvl > 4 ? 1: 0));

warning: LF will be replaced by CRLF in src/server/game/Globals/ObjectMgr.cpp.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 19dfb9d..9d6922a 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -105,7 +105,7 @@ enum Classes
     CLASS_SHAMAN        = 7,
     CLASS_MAGE          = 8,
     CLASS_WARLOCK       = 9,
-    //CLASS_UNK           = 10,
+    CLASS_TEST          = 10,
     CLASS_DRUID         = 11
 };
 
@@ -116,7 +116,7 @@ enum Classes
     ((1<<(CLASS_WARRIOR-1))|(1<<(CLASS_PALADIN-1))|(1<<(CLASS_HUNTER-1))|
     (1<<(CLASS_ROGUE-1))  |(1<<(CLASS_PRIEST-1)) |(1<<(CLASS_SHAMAN-1))|
     (1<<(CLASS_MAGE-1))   |(1<<(CLASS_WARLOCK-1))|(1<<(CLASS_DRUID-1)) |
-    (1<<(CLASS_DEATH_KNIGHT-1)))
+    (1<<(CLASS_TEST-1))   |(1<<(CLASS_DEATH_KNIGHT-1)))
 
 // valid classes for creature_template.unit_class
 enum UnitClass
@@ -2700,7 +2700,8 @@ enum QuestSort
     QUEST_SORT_JEWELCRAFTING       = 373,
     QUEST_SORT_NOBLEGARDEN         = 374,
     QUEST_SORT_PILGRIMS_BOUNTY     = 375,
-    QUEST_SORT_LOVE_IS_IN_THE_AIR  = 376
+    QUEST_SORT_LOVE_IS_IN_THE_AIR  = 376,
+ QUEST_SORT_TEST                = 400
 };
 
 inline uint8 ClassByQuestSort(int32 QuestSort)
@@ -2716,6 +2717,7 @@ inline uint8 ClassByQuestSort(int32 QuestSort)
         case QUEST_SORT_HUNTER:         return CLASS_HUNTER;
         case QUEST_SORT_PRIEST:         return CLASS_PRIEST;
         case QUEST_SORT_DRUID:          return CLASS_DRUID;
+ case QUEST_SORT_TEST:           return CLASS_TEST;
         case QUEST_SORT_DEATH_KNIGHT:   return CLASS_DEATH_KNIGHT;
     }
     return 0;
@@ -3357,7 +3359,7 @@ enum SpellFamilyNames
     SPELLFAMILY_SHAMAN      = 11,
     SPELLFAMILY_UNK2        = 12,                           // 2 spells (silence resistance)
     SPELLFAMILY_POTION      = 13,
-    // 14 - unused
+    SPELLFAMILY_TEST        = 14, // 14 - unused  // TEST
     SPELLFAMILY_DEATHKNIGHT = 15,
     // 16 - unused
     SPELLFAMILY_PET         = 17

warning: LF will be replaced by CRLF in src/server/game/Miscellaneous/SharedDefines.h.
The file will have its original line endings in your working directory.
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 3e30e95..5709504 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -27,6 +27,7 @@ void AddSC_example_commandscript();
 // spells
 void AddSC_deathknight_spell_scripts();
 void AddSC_druid_spell_scripts();
+void AddSC_test_spell_scripts();
 void AddSC_generic_spell_scripts();
 void AddSC_hunter_spell_scripts();
 void AddSC_mage_spell_scripts();
@@ -656,6 +657,7 @@ void AddSpellScripts()
 {
     AddSC_deathknight_spell_scripts();
     AddSC_druid_spell_scripts();
+ AddSC_test_spell_scripts();
     AddSC_generic_spell_scripts();
     AddSC_hunter_spell_scripts();
     AddSC_mage_spell_scripts();

warning: LF will be replaced by CRLF in src/server/game/Scripting/ScriptLoader.cpp.
The file will have its original line endings in your working directory.
diff --git a/src/server/scripts/Spells/CMakeLists.txt b/src/server/scripts/Spells/CMakeLists.txt
index 077b4cc..9b2bee3 100644
--- a/src/server/scripts/Spells/CMakeLists.txt
+++ b/src/server/scripts/Spells/CMakeLists.txt
@@ -14,6 +14,7 @@ set(scripts_STAT_SRCS
   Spells/spell_hunter.cpp
   Spells/spell_rogue.cpp
   Spells/spell_druid.cpp
+  Spells/spell_test.cpp
   Spells/spell_dk.cpp
   Spells/spell_quest.cpp
   Spells/spell_warrior.cpp

warning: LF will be replaced by CRLF in src/server/scripts/Spells/CMakeLists.txt.
The file will have its original line endings in your working directory.


Then proceed to the creation of sql files.
Code: [Select]
player_classlevelstats

REPLACE INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (10, 1, 46, 65);

Code: [Select]
player_levelstats


REPLACE INTO `player_levelstats` (`race`, `class`, `level`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES (2, 10, 1, 23, 20, 23, 17, 24);


Code: [Select]
playercreateinfo

REPLACE INTO `playercreateinfo` (`race`, `class`, `map`, `zone`, `position_x`, `position_y`, `position_z`, `orientation`) VALUES (1, 10, 0, 12, -8949.95, -132.493, 83.5312, 0);

Code: [Select]

playercreateinfo_spell

REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 81, 'Dodge');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 196, 'One-Handed Axes');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 198, 'One-Handed Maces');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 201, 'One-Handed Swords');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 203, 'Unarmed');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 204, 'Defense');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 522, 'SPELLDEFENSE (DND)');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 668, 'Language Common');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 1843, 'Disarm');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 2382, 'Generic');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 2479, 'Honorless Target');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 3050, 'Detect');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 3365, 'Opening');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 5301, 'Defensive State (DND)');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 6233, 'Closing');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 6246, 'Closing');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 6247, 'Opening');
REPLACE INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (1, 10, 6477, 'Opening');
etc....


then make some changes in the dbc files:

CharStartOutfit.dbc,
ChrClasses.dbc,
gtOCTClassCombatRatingScalar.dbc,
SkillLine.dbc,
SkillRaceClassInfo.dbc,
SkillTiers.dbc,
TalentTab.dbc....

CharStartOutfit.dbc.csv
For example here are a couple of lines in the race for one of the new class



ChrClasses.dbc




gtOCTClassCombatRatingScalar.dbc

each class is described scalar each combat rating, ie to the number of lines divided into 11 groups, and then fill in the lines for the tenth grade for your preferred formula (you can simply use the other classes or set 1 for all tests).


SkillLine.dbc




SkillRaceClassInfo.dbc


TalentTab.dbc



I showed you the basic job of DBC, understand that there is not difficult to complete.


WorldStateFrame.lua

Code: [Select]

CLASS_BUTTONS = {
["WARRIOR"] = {0, 0.25, 0, 0.25},
["MAGE"] = {0.25, 0.49609375, 0, 0.25},
["ROGUE"] = {0.49609375, 0.7421875, 0, 0.25},
["DRUID"] = {0.7421875, 0.98828125, 0, 0.25},
["HUNTER"] = {0, 0.25, 0.25, 0.5},
["SHAMAN"] = {0.25, 0.49609375, 0.25, 0.5},
["PRIEST"] = {0.49609375, 0.7421875, 0.25, 0.5},
["WARLOCK"] = {0.7421875, 0.98828125, 0.25, 0.5},
["PALADIN"] = {0, 0.25, 0.5, 0.75},
["DEATHKNIGHT"] = {0.25, 0.49609375, 0.5, 0.75},
["TEST"] = {0.49609375, 0.7421875, 0.5, 0.75},
};


Constants.lua
Code: [Select]

RAID_CLASS_COLORS = {
["HUNTER"] = { r = 0.67, g = 0.83, b = 0.45 },
["WARLOCK"] = { r = 0.58, g = 0.51, b = 0.79 },
["PRIEST"] = { r = 1.0, g = 1.0, b = 1.0 },
["PALADIN"] = { r = 0.96, g = 0.55, b = 0.73 },
["MAGE"] = { r = 0.41, g = 0.8, b = 0.94 },
["ROGUE"] = { r = 1.0, g = 0.96, b = 0.41 },
["DRUID"] = { r = 1.0, g = 0.49, b = 0.04 },
["SHAMAN"] = { r = 0.0, g = 0.44, b = 0.87 },
["WARRIOR"] = { r = 0.78, g = 0.61, b = 0.43 },
["DEATHKNIGHT"] = { r = 0.77, g = 0.12 , b = 0.23 },
["TEST"] = { r = 0.0, g = 0.45, b = 0.45 },
};


CLASS_SORT_ORDER = {
"WARRIOR",
"DEATHKNIGHT",
"PALADIN",
"PRIEST",
"SHAMAN",
"DRUID",
"ROGUE",
"MAGE",
"WARLOCK",
"HUNTER",
"TEST",
};



CLASS_ICON_TCOORDS = {
["WARRIOR"] = {0, 0.25, 0, 0.25},
["MAGE"] = {0.25, 0.49609375, 0, 0.25},
["ROGUE"] = {0.49609375, 0.7421875, 0, 0.25},
["DRUID"] = {0.7421875, 0.98828125, 0, 0.25},
["HUNTER"] = {0, 0.25, 0.25, 0.5},
["SHAMAN"] = {0.25, 0.49609375, 0.25, 0.5},
["PRIEST"] = {0.49609375, 0.7421875, 0.25, 0.5},
["WARLOCK"] = {0.7421875, 0.98828125, 0.25, 0.5},
["PALADIN"] = {0, 0.25, 0.5, 0.75},
["DEATHKNIGHT"] = {0.25, .5, 0.5, .75},
["TEST"] = {0.49609375, 0.7421875, 0.5, 0.75},
};



CharacterCreate.lua
CLASS_ICON_TCOORDS = {
   ["WARRIOR"]   = {0, 0.25, 0, 0.25},
   ["MAGE"]   = {0.25, 0.49609375, 0, 0.25},
   ["ROGUE"]   = {0.49609375, 0.7421875, 0, 0.25},
   ["DRUID"]   = {0.7421875, 0.98828125, 0, 0.25},
   ["HUNTER"]   = {0, 0.25, 0.25, 0.5},
   ["SHAMAN"]   = {0.25, 0.49609375, 0.25, 0.5},
   ["PRIEST"]   = {0.49609375, 0.7421875, 0.25, 0.5},
   ["WARLOCK"]   = {0.7421875, 0.98828125, 0.25, 0.5},
   ["PALADIN"]   = {0, 0.25, 0.5, 0.75},
   ["DEATHKNIGHT"]   = {0.25, 0.49609375, 0.5, 0.75},
   ["MONK"]        = {0.49609375, 0.7421875, 0.5, 0.75},
};

GlueStrings.lua

CLASS_INFO_TEST0 = " ";
CLASS_INFO_TEST1 = " ";
CLASS_INFO_TEST2 = " .";
CLASS_INFO_TEST3 = " .";
CLASS_INFO_TEST = " .";

+ Some changes in ChracterCreate.xml (you can take this file simply from the next topic, where they tried to describe a new class)

I did not do this entire work again, but you will see the result of it at the time, when I myself studied it.


« Last Edit: January 22, 2013, 04:47:24 pm by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #1 on: January 21, 2013, 09:22:19 pm »
Magnificent, beautiful work.

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #2 on: January 21, 2013, 10:56:57 pm »
This isfor trinitycore, isn´t it?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #3 on: January 21, 2013, 11:11:36 pm »
this is for TrinityCore)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #4 on: January 21, 2013, 11:19:56 pm »
A little bit confusing. But thanks for the work. Will help many people.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

Shutok2

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 90
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #5 on: January 22, 2013, 04:43:44 pm »
Nice work! Maybe using colors and titles it would be more atractive ;D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #6 on: January 22, 2013, 05:26:08 pm »
Thank you, now very little free time ... As soon as I'll have an hour free, I dooformlyu postrayus guidance and a closer look at the work on the necessary dbc and lua / xml files, as well as making more visual design.  :ugeek:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #7 on: January 24, 2013, 05:37:47 pm »
Getting an error when compiling:
Code: [Select]
14>game.lib(ScriptLoader.obj) : error LNK2019: símbolo externo "void __cdecl AddSC_nigromante_spell_scripts(void)" (?AddSC_nigromante_spell_scripts@@YAXXZ) sin resolver al que se hace referencia en la función "void __cdecl AddSpellScripts(void)" (?AddSpellScripts@@YAXXZ)
Translation to english:
Code: [Select]
14>game.lib(ScriptLoader.obj) : error LNK2019: external simbol "void __cdecl AddSC_nigromante_spell_scripts(void)" (?AddSC_nigromante_spell_scripts@@YAXXZ) without resolving which refers  in function "void __cdecl AddSpellScripts(void)" (?AddSpellScripts@@YAXXZ)
I applied patches manually, and all seems to be correct. May be the merge with the Mmaps branch the cause of the error? (It has no relation as i see, but i don´t know so much about C++)
Also, i get 1 ommited:
========== Generate: 15 correct, 1 incorrect, 0 updated, 1 ommited ==========
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #8 on: January 24, 2013, 06:20:31 pm »
check-you can build a core if you have a clean source?)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #9 on: January 24, 2013, 07:10:15 pm »
Whein i compile a fresh one i don´t get any error:
========== Generate: 16 correct, 0 incorrect, 0 updated, 1 ommited ==========
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #10 on: January 24, 2013, 07:49:59 pm »
you put the patch crooked, or your sources are different from mine ... Prescribe all hands with 0.tut errors can not be, if to be careful.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #11 on: January 24, 2013, 09:41:07 pm »
I applied the patch manually, cuz when i usd the command from git bash it gave me error :S
I´ll reapply the whole diff tomorrow.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #12 on: January 24, 2013, 09:58:59 pm »
just now noticed a mistake ... you have no right to create a script .... nigromante .... cpp

Make it blank or simply remove from cmake and scriptloader, I do not think you will immediately start to add new scripts to spell this class.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

osler

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #13 on: January 24, 2013, 10:08:46 pm »
It already was in blank, but i´ll remove it from the archives.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

akriso

  • Contributors
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TUTORIAL] for creating a new class
« Reply #14 on: January 24, 2013, 10:33:29 pm »
once you deleted it from the folder with the source code, why did you then leave a link to the file in scriptloader.cpp and cmake.txt?)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »