Untested but I think this will work.
diff --git a/src/map/pc.c b/src/map/pc.c
index 752e42f..6a0bc81 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -898,6 +898,7 @@ bool pc_isItemClass (struct map_session_data *sd, struct item_data* item) {
int pc_isequip(struct map_session_data *sd,int n)
{
struct item_data *item;
+ struct unit_data *ud = unit_bl2ud(&sd->bl);
nullpo_ret(sd);
@@ -917,6 +918,9 @@ int pc_isequip(struct map_session_data *sd,int n)
if(item->sex != 2 && sd->status.sex != item->sex)
return 0;
+ if (ud && ud->skilltimer != INVALID_TIMER)
+ return 0; // Cannot change equipment while casting
+
if (sd->sc.count) {
if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON]) // Also works with left-hand weapons [DracoRPG]