Jump to content
Search In
  • More options...
Find results that contain...
Find results in...



#0
Guest

User Menu


Sign In

Sign In



Sign Up

Forum Menu


Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!

  • 0
OMGhixD

C++ error - Instant Enchant / Scrolls

Question

T
O
P
I
C

S
T
A
R
T
E
R

So i've got some issues with my small unit.cpp modification

 

		// Instant Enchants / Scrolls
	if (SpellProto->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM || SpellProto->Effects[0].Effect == SPELL_EFFECT_APPLY_GLYPH || SpellProto->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC)
    castTime = 1;

^ Script

 

Error	1	error C2059: syntax error : '->'	Unit.cpp	14497	1	game


^ Error

 

Thank you in any advance :)

 

Sincerely

OMGhixD

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

T
O
P
I
C

S
T
A
R
T
E
R
  • 1
11 hours ago, xPaw said:

@OMGhixD did you solve ?

Funny enough yes. all i had to do was change SpellProto to spellProto. ( make the S lowercase.. [facepalm] )

Share this post


Link to post
Share on other sites
  • 0

Change:

SpellProto->Effects[0].Effect

to:

spellInfo->Effects[0].Effect

 

You end up with:

if (spellInfo->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM || spellInfo->Effects[0].Effect == SPELL_EFFECT_APPLY_GLYPH || spellInfo->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC)
    castTime = 1;

 

Share this post


Link to post
Share on other sites
T
O
P
I
C

S
T
A
R
T
E
R
  • 0
1 hour ago, Death said:

Change:

SpellProto->Effects[0].Effect

to:

spellInfo->Effects[0].Effect

 

You end up with:

if (spellInfo->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM || spellInfo->Effects[0].Effect == SPELL_EFFECT_APPLY_GLYPH || spellInfo->Effects[0].Effect == SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC)
    castTime = 1;

 

I shall give it an attempt :)

 

Error	1	error C2065: 'spellInfo' : undeclared identifier	Unit.cpp	14497	1	game
Error	2	error C2227: left of '->Effects' must point to generic type	Unit.cpp	14497	1	game
Error	3	error C2228: left of '.Effect' must have Unit.cpp	14497	1	game

Now i got these errors

Share this post


Link to post
Share on other sites
T
O
P
I
C

S
T
A
R
T
E
R
  • 0
1 minute ago, Death said:

What revision?

It's a 4.3.4 trinitycore. But it's the Emucoach core

Share this post


Link to post
Share on other sites
  • 0

I think trying to put this in unit.cpp is incorrect. I don't have the emucoach source to look at. So I used https://github.com/TrinityCoreLegacy/TrinityCore/blob/4.3.4/src/server/game/Spells/Spell.cpp instead.

Since there is a command .cheat casttime (CHEAT_CASTTIME), we know that the core is already triggers to accept the override to cast time. Working off this and the modification by @Death in Spell.cpp might do what you are looking for. 

This is untested

 

~hope this helps

Share this post


Link to post
Share on other sites
  • 0

The question(s) in this support topic have been answered and the topic author has resolved their issue. This topic is now closed. If you have other questions, please open a new topic.

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

About Us

MMO-Society is the Forum former known as Lordcraft, MMO-Society offers various of Resources to help you evolve your knowledge within Emulation, In the process we make sure to form a strong community bond in-between each other and thus we are proud to can admit that MMO-Society is possibly the friendliest Community Forum to currently exist.

All trademarks referenced are the properties of their respective owners.
©2018 MMO-Society. All rights reserved.

Social Links

Discord Server Join
Twitter Follow us
×
×
  • Create New...