Jump to content

[Help] Player->CastSpell

Auntie Mangos

Recommended Posts

Thanks for reply,

i have all three reagents equipped (20406, 20407, 20408). In this order i do:

if(pPlayer->HasAura(24746)) { // Aura is true when items equipped
 pPlayer->DestroyItemCount(20406, 1, true, true);
 pPlayer->DestroyItemCount(20407, 1, true, true);
 pPlayer->DestroyItemCount(20408, 1, true, true);

I will try


as TOM_RUS suggested.

Can you also have a look here. What is the correct way to remove an consumable item from equipment?

Regards warrior

Sry when i ask maybe nooob questions, but with coding i`m quite new to mangos and all.

Link to comment
Share on other sites

  • 39 years later...

Hello mangos team,

i changed to pPlayer->CastSpell(pPlayer,24760,true); as TOM_RUS suggested. I have the required items equipped, but instead of summoning the creature, i get damage. Here is my server.log

2009-09-02 06:52:57 WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=49314]
2009-09-02 06:52:57 SD2: player 157622024 has aura 24746.
2009-09-02 06:52:57 Sending SMSG_SPELL_GO id=24744
2009-09-02 06:52:57 Spell: Effect : 6
2009-09-02 06:52:57 Spell: Aura is: 4
2009-09-02 06:52:57 Aura: construct Spellid : 24744, Aura : 4 Duration : 8000 Target : 1 Damage : 0
2009-09-02 06:52:57 Aura 4 now is in use
2009-09-02 06:52:57 WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: 49314]
2009-09-02 06:52:59 STORAGE_SIZE: 5
        04 00 00 00 00
2009-09-02 06:53:05 Aura 4 now is remove mode 0

Any help would be appreciate

regards warrior

Link to comment
Share on other sites

Helllo krz,

what is Object Activation or how does ir work?

I can find a spell id and player can cast that spell (in this case i was able to find two spells):

first: summon templar

second: summon templar, trigger, this one effects the first as far as i understand

But always i get damage, altough i have the required stuff equipped and log tells me that aura is in use.

Could i be done with script ai?

Regards warrior

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use