• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Compile Error

Status
Not open for further replies.

Intouch

Respected Member
Hello, EMUDEVS!

I was working on some fix and I got compile errors:

6>C:\Users\Desktop\TrinityCore\src\server\game\Entities\Unit\StatSystem.cpp(1157): error C3861: 'GetPet': identifier not found
6>C:\Users\Desktop\TrinityCore\src\server\game\Entities\Unit\StatSystem.cpp(1162): error C2065: 'dmg_multiplier' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Entities\Unit\StatSystem.cpp(1164): error C2181: illegal else without matching if
6>C:\Users\Desktop\TrinityCore\src\server\game\Entities\Unit\StatSystem.cpp(1167): error C2065: 'dmg_multiplier' : undeclared identifier


I insert code inside StatSystem.cpp
Here is Code:

Code:
+            Pet* pet = GetPet();
+            if (IsPet())
+            {
+                if (pet->HasAura(2132322))
+                    value *= 1.2f; // +20% HP
+					dmg_multiplier = 0.15f; // +15% attack power
+
+				else if (pet->HasAura(2312122)) 
+                {				   
+				    value *= 1.2f; // +20% = 40% HP
+					dmg_multiplier = 0.15f; // +15% = 30% attack power
+	}
+	   }

This is custom spell id, however I got that compile errors and I dont know how to fix it.
 
Last edited:

Neth

BETA Tester
Core tells you there is no such things as GetPet and dmg_multiplier and you failed the condition prolly because of your codestyle, if you still don't understand i'll give you the solution but take the time to understand before replying again thanks
 

Intouch

Respected Member
IDK realy I saw that code inside my StatSystem.cpp it's already used idk why it shows errors on this code :/
 

Tommy

Founder
I insert code inside StatSystem.cpp

I mentioned before that this isn't recommended at all and for the reasons (issues) you're having. 'GetPet()' has nothing on the left like a player pointer. Is a "player" variable anywhere? If so, it would go like "player->GetPet();". I don't know about the other stuff since there's not much to go by. As I said, applying patches like those can pretty much mess up your source.
 
Status
Not open for further replies.
Top